20.0 TIMER2 MODULE
The Timer2 module incorporates the following features:
• 8-bit Timer and Period registers (TMR2 and PR2,
respectively)
• Readable and writable (both registers)
• Software programmable prescaler (1:1, 1:4, 1:16,
and 1:64)
• Software programmable postscaler (1:1 to 1:16)
• Interrupt on TMR2 match with PR2
See Figure 20-1 for a block diagram of Timer2.
FIGURE 20-1:
TIMER2 BLOCK DIAGRAM
Fosc/4
Prescaler
1:1, 1:4, 1:16, 1:64
2
T2CKPS<1:0>
TMR2 R
Comparator
PR2
PIC16(L)F1503
T2_match
Rev. 10-000019A
7/30/2013
To Peripherals
Postscaler
1:1 to 1:16
4
T2OUTPS<3:0>
set bit
TMR2IF
FIGURE 20-2:
TIMER2 TIMING DIAGRAM
FOSC/4
Prescale
PR2
TMR2
0x00
0x01
0x02
1:4
0x03
0x03
0x00
T2_match
Pulse Width(1)
Note 1: The Pulse Width of T2_match is equal to the scaled input of TMR2.
0x01
Rev. 10-000020A
7/30/2013
0x02
2011-2015 Microchip Technology Inc.
DS40001607D-page 151