
2002 Microchip Technology Inc.
Preliminary
DS30485A-page 107
PIC18FXX39
12.0 TIMER2 MODULE
The Timer2 module is an 8-bit timer with a selectable
8-bit period. It has the following features:
Input from system clock at FOSC/4 with
programmable input prescaler
Interrupt on timer-to-period match with
programmable postscaler
The module has three registers: the TMR2 counter, the
PR2 period register, and the T2CON control register.
The general operation of Timer2 is shown in
Additional information on the use of Timer2 as a
FIGURE 12-1:
TIMER2 BLOCK DIAGRAM
Note:
In PIC18FXX39 devices, Timer2 is used
exclusively as a time-base for the PWM
modules in motor control applications. As
such, it is not available to users as a
resource. Although their locations are
shown on the device data memory maps,
none of the Timer2 registers are directly
accessible. Users should not alter the
values of these registers.
Comparator
TMR2
Sets Flag
TMR2
Output
RESET
Postscaler
Prescaler
PR2
FOSC/4
1:1 to 1:16
1:1, 1:4, 1:16
bit TMR2IF
(ProMPT Module)
(TMR2 = PR2)
(ProMPT Module)