12. Timer 0/1/2/3/4/5
A96G140/A96G148/A96A148 User’s manual
118
12.3.4
16-bit timer 2 block diagram
In this section, a 16-bit timer 2 is described in a block diagram.
T2MS[1:0]
T2POL
Reload
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
Comparator
16-bit Counter
T2CNTH/T2CNTL
16-bit B Data Register
T2BDRH/T2BDRL
Clear
B Match
Buffer Register B
Comparator
16-bit A Data Register
T2ADRH/T2ADRL
T2IFR
INT_ACK
Clear
To interrupt
block
A Match
Buffer Register A
Reload
Pulse
Generator
T2O/
PWM2O
R
EINT12
T2CNTR
T2EN
3
T2CK[2:0]
Clear
EIPOL1[7:6]
FLAG12
(EIFLAG1.3)
INT_ACK
Clear
To interrupt
block
2
2
T2MS[1:0]
2
T1 A Match
A Match
T2CC
T2EN
A Match
T2CC
T2EN
NOTE
: T1 A Match is a pulse for the timer 2 clock source if it is selected.
Figure 53. 16-bit Timer 2 Block Diagram
12.3.5
Register map
Table 19. TIMER 2 Register Map
Name
Address
Direction
Default
Description
T2ADRH
C5H
R/W
FFH
Timer 2 A Data High Register
T2ADRL
C4H
R/W
FFH
Timer 2 A Data Low Register
T2BDRH
C7H
R/W
FFH
Timer 2 B Data High Register
T2BDRL
C6H
R/W
FFH
Timer 2 B Data Low Register
T2CRH
C3H
R/W
00H
Timer 2 Control High Register
T2CRL
C2H
R/W
00H
Timer 2 Control Low Register
12.3.6
Register description