User’s Manual
6-27
05.99
On-Chip Peripheral Components
C513AO
Figure 6-16
Timer 2 Auto-Reload Mode (DCEN = 0)
If EXEN2 = 0, Timer 2 counts up to FFFFH and then sets the TF2 bit upon overflow. The overflow
also causes the timer registers to be reloaded with the 16-bit value in RC2H and RC2L. The values
in RC2H and RC2L are preset by software.
If EXEN2 = 1, a 16-bit reload can be triggered either by an overflow or by a 1-to-0 transition at the
external input T2EX (P1.1). This transition also sets the EXF2 bit. Both the TF2 and EXF2 bits can
generate a Timer 2 interrupt if enabled.
Setting the DCEN bit enables Timer 2 to count up or down as shown in Figure 6-17. In this mode,
the T2EX pin controls the direction of count.
MCS02584
EXF2
EXEN2
TF2
RC2L
RC2H
TL2
TH2
Timer
Interrupt
P1.1/
T2EX
2
Overflow
Control
C/T2 = 0
OSC
Control
TR2
Detection
Transition
C/T2 = 1
P1.0/T2
÷ 12
1
_
<
<
_
1