W79E532/W79L532
1/4
osc
1/12
T2 = P1.0
TR2 = T2CON.2
T2EX = P1.1
T2M = CKCON.5
1
C/T2 = T2CON.1
0
0
1
TL2
TH2
T2CON.7
TF2
Timer 2
Interrupt
RCAP2L RCAP2H
EXEN2 = T2CON.3
EXF2
T2CON.6
Figure 14. 16-Bit Capture Mode
Auto-reload Mode, Counting up
The auto-reload mode as an up counter is enabled by clearing the
CP / RL2
bit in the T2CON register
and clearing the DCEN bit in T2MOD register. In this mode, Timer/Counter 2 is a 16 bit up counter.
When the counter rolls over from FFFFh, a reload is generated that causes the contents of the
RCAP2L and RCAP2H registers to be reloaded into the TL2 and TH2 registers. The reload action also
sets the TF2 bit. If the EXEN2 bit is set, then a negative transition of T2EX pin will also cause a
reload. This action also sets the EXF2 bit in T2CON.
T2M = CKCON.5
1/4
1
0
osc
1/12
T2 = P1.0
TR2 = T2CON.2
T2EX = P1.1
C/T2 = T2CON.1
0
T2CON.7
TL2
TH2
1
TF2
Timer 2
Interrupt
RCAP2L RCAP2H
EXEN2 = T2CON.3
EXF2
T2CON.6
Figure 15. 16-Bit Auto-reload Mode, Counting Up
- 41 -
Publication Release Date: November 21, 2005
Revision A5