4.
Measurement of difference time
This mode is used to measure the difference in time between the rising edges of
external pulses input through TB1IN0 and TB1IN1.
Keep the 16-bit timer/event counter (TMRB1) counting (Free running) with the
prescaler output clock, and load the UC12 value into TB1CP0H/L at the rising
edge of the input pulse to TB1IN0. Then the interrupt INT4 is generated.
Similarly, the UC012 value is loaded into TB1CP1H/L at the rising edge of the
input pulse to TB1IN1, generating the interrupt INT5.
The time difference between these pulses can be obtained by multiplying the
value subtracted TB1CP0H/L from TB1CP1H/L and the internal clock cycle
together at which loading the UC12 value into TB1CP0H/L and TB1CP1H/L has
been done.
Count clock
(Prescaler output clock)
TB1IN0 pin input
TB1IN1 pin input
Load into TB1CP0H/L
Load intoTB1CP1H/L
INT4
INT5
C1
Difference time
Figure 3.8.16 Measurement of Difference Time
92CM22-140
C2
TMP92CM22
2007-02-16