BAT32G1x9 user manual | Chapter 9 Timer C
308 / 1149
Rev.1.02
9.4.4
Enter the capture motion
If comparator 1 produces an interrupt during the Timer C action, the Timer C action changes.
(
1
)
Case 1:
TCCR2. CMP1_TCR=01, the count value of Timer C is transferred to the count buffer.
⚫
TCCR2.CMP1_TCR=01 (select input capture function).
⚫
TCCR2. TSTART=1 (Timer C count starts).
Fig. 9-12: An example of an input captured motion
TC counting
source
TCCR2.CMP1_TC
R
Interrupt signal of
Comparator 1
TCCR2.TSTART
TC counting
TCBUF
(
2
)
Case 2:
TCCR2. CMP1_TCR=11, the count value of Timer C is transmitted to the count buffer, and the count value
of Timer C is reset.
⚫
TCCR2.CMP1_TCR=11 (select Input Capture and Reset Function).
⚫
TCCR2. TSTART=1 (Timer C count starts).
Fig. 9-13: Example of input captured motion (reset count value at the same time)
TC counting source
TCCR2.CMP1_TCR
Interrupt signal of
Comparator 1
TCCR2.TSTART
TC counting
TCBUF