A96G150 User's manual
12. Timer 0/1/2/3/4/5
127
12.3.2
16-bit capture mode
Timer 2 capture mode is set by configuring T2MS[1:0] as ‘01’.
It uses an internal clock as a clock source.
Basically, the 16-bit timer 2 capture mode has the same function as the 16-bit timer/counter mode, and
the interrupt occurs when T2CNTH/T2CNTL is equal to T2ADRH/T2ADRL. The T2CNTH, T2CNTL
values are automatically cleared by a match signal. It can be cleared by software (T2CC) too.
A timer interrupt in capture mode is very useful when the pulse width of captured signal is wider than
the maximum period of timer. Capture result is loaded into T2BDRH/T2BDRL. In timer 2 capture mode,
timer 2 output (T2O) waveform is not available.
According to EIPOL1 registers setting, the external interrupt EINT3 function is selected. EINT3 pin must
be set as an input port.
A Match
T2CC
T2EN
P
r
e
s
c
a
l
e
r
fx
M
U
X
fx/2
fx/4
fx/32
fx/128
fx/512
fx/8
fx/1
16-bit Cou nte r
T2CNTH/T2CNTL
16-bit B Data Re gister
T2BDRH/T2BDRL
Clear
T1 A Match
Comparator
16-bit A Data Re gister
T2ADRH/T2ADRL
T2IFR
INT_ACK
Clear
To i nte rrupt
block
A Match
Buffer Register A
Reload
R
EINT3
T2CNTR
T2EN
3
T2CK[2:0]
Clear
FLAG3
(EIFLAG1.3)
INT_ACK
Clear
To i nte rrupt
block
T2MS[1:0]
2
A Match
T2CC
T2EN
T2EN
T2CRH
1
ADDRES S:C3H
INITIAL VALUE : 0000_0000B
–
T2MS1
T2MS0
–
–
–
T2CC
–
0
1
–
–
–
X
T2CK2
T2CRL
X
ADDRESS:C2H
INITIAL VALUE : 0000_0000B
T2CK1
T2CK0
T2IFR
–
T2POL
–
T2CNTR
X
X
X
–
X
–
X
EIPOL1[7:6]
2
NOTE:
T1 A Match is a pulse for the timer 2 clock source if it is selected.
Figure 44. 16-bit Capture Mode of Timer 2
Содержание A96G150
Страница 126: ...12 Timer 0 1 2 3 4 5 A96G150 User s manual 126 Figure 43 16 bit Timer Counter Mode Operation Example...
Страница 136: ...12 Timer 0 1 2 3 4 5 A96G150 User s manual 136 Figure 51 16 bit Timer Counter Mode Operation Example...
Страница 147: ...A96G150 User s manual 12 Timer 0 1 2 3 4 5 147 Figure 59 16 bit Timer Counter Mode Operation Example...
Страница 157: ...A96G150 User s manual 12 Timer 0 1 2 3 4 5 157 Figure 67 16 bit Timer Counter Mode Operation Example...
Страница 171: ...A96G150 User s manual 14 12 bit ADC 171 Figure 79 ADC Operation Flow Sequence...
Страница 333: ...A96G150 User s manual Revision history 333 Revision history Revision Date Notes 1 00 2022 06 22 First creation...