User’s Manual
6-29
05.99
On-Chip Peripheral Components
C513AO
6.2.2.3 Capture Mode
In Capture Mode, there are two options selected by bit EXEN2 in SFR T2CON.
If EXEN2 = 0, Timer 2 is a 16-bit timer or counter which sets bit TF2 in SFR T2CON on overflow.
This bit can be used to generate an interrupt.
If EXEN2 = 1, as well as setting bit TF2 as above, Timer 2 has the added feature that a 1-to-0
transition at external input T2EX causes the current value in TH2 and TL2 to be captured into RC2H
and RC2L, respectively. Additionally, a transition at T2EX causes bit EXF2 in SFR T2CON to be
set. The EXF2 bit, like TF2, can generate an interrupt. Capture Mode is illustrated in Figure 6-18.
Figure 6-18
Timer 2 in Capture Mode
Note: Baudrate Generator Mode is selected by RCLK = 1 and/or TCLK = 1 in SFR T2CON. It is
described in conjunction with the serial port.
MCT02437
EXF2
EXEN2
TF2
RC2L
RC2H
TL2
TH2
Timer 2
Interrupt
Overflow
Control
C/T2 = 0
OSC
Control
TR2
Detection
Transition
C/T2 = 1
P1.0/
T2
T2EX
P1.1/
÷ 12
1
_
<