A96G150 User's manual
12. Timer 0/1/2/3/4/5
109
12.1.3
8-bit capture mode
Timer 0 capture mode is
set by configuring T0MS[1:0] as ‘1x’. Clock source can use the internal/external
clock. Basically, it has the same function as the 8-bit timer/counter mode has, and the interrupt occurs
when T0CNT equals to T0DR. T0CNTvalue is automatically cleared by match signal and it can be also
cleared by software (T0CC).
This timer interrupt in capture mode is very useful when the pulse width of captured signal is wider than
the maximum period of timer.
The capture result is loaded into T0CDR. In the timer 0 capture mode, timer 0 output (T0O) waveform
is not available.
According to EIPOL1 registers setting, the external interrupt EINT1 function is chosen. Of course, the
EINT1 pin must be set to an input port.
T0CDR and T0DR are in the same address. In the capture mode, reading operation reads T0CDR, not
T0DR and writing operation will update T0DR.
P
r
e
s
c
a
l
e
r
fx
M
U
X
fx/2
T0CNT(8 Bit)
EC0
fx/4
fx/8
fx/32
fx/128
fx/512
fx/2048
3
T0CK[2:0]
T0EN
8-bit Timer 0 Coun ter
T0DR( 8Bit)
Comparator
T0IFR
8-bit Timer 0 Data Reg ister
INT_ACK
Clear
Match
MUX
T0CDR(8 Bit)
Clear
FLAG1
(EIFLAG1 .1 )
2
T0MS[1:0 ]
2
T0MS[1:0 ]
INT_ACK
Clear
To in terru pt
block
To in terru pt
block
T0EN
-
T0MS 1
T0MS 0
T0CK 2
T0CK 1
T0CK 0
T0CC
T0CR
1
-
1
x
x
x
x
x
ADDRES S : B 2H
INITIAL VALUE: 00 00_0000 B
Clear
EINT1
EIPOL1 [3:2]
2
Match signa l
T0CC
Figure 30. 8-bit Capture Mode for Timer 0
Содержание 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...