21 Timer2 Module

The Timer2 module is a 8-bit timer that incorporates the following features:

  • 8-Bit Timer and Period Registers
  • Readable and Writable
  • Software Programmable Prescaler (1:1 to 1:128)
  • Software Programmable Postscaler (1:1 to 1:16)
  • Interrupt on T2TMR Match with T2PR
  • One-Shot Operation
  • Full Asynchronous Operation
  • Includes Hardware Limit Timer (HLT)
  • Alternate Clock Sources
  • External Timer Reset Signal Sources
  • Configurable Timer Reset Operation

See Figure 21-1 for a block diagram of Timer2. See table below for the clock source selections.

Important: References to module Timer2 apply to all the even numbered timers on this device. (Timer2, Timer4, etc.)
Figure 21-1. Timer2 with Hardware Limit Timer (HLT) Block Diagram
Note:
  1. Signal to the CCP to trigger the PWM pulse.
  2. See TxRST for external Reset sources.
Table 21-1. Clock Source Selection
CS<4:0>Clock Source
Timer2Timer4Timer6
11111-11000ReservedReservedReserved
10111CLC8_outCLC8_outCLC8_out
10110CLC7_outCLC7_outCLC7_out
10101CLC6_outCLC6_outCLC6_out
10100CLC5_outCLC5_outCLC5_out
10011CLC4_outCLC4_outCLC4_out
10010CLC3_outCLC3_outCLC3_out
10001CLC2_outCLC2_outCLC2_out
10000CLC1_outCLC1_outCLC1_out
01111-01001ReservedReservedReserved
01000ZCD_OUTZCD_OUTZCD_OUT
00111CLKREF_OUTCLKREF_OUTCLKREF_OUT
00110SOSCSOSCSOSC
00101MFINTOSC (31 kHz)MFINTOSC (31 kHz)MFINTOSC (31 kHz)
00100LFINTOSCLFINTOSCLFINTOSC
00011HFINTOSCHFINTOSCHFINTOSC
00010FOSCFOSCFOSC
00001FOSC/4 FOSC/4 FOSC/4
00000Pin selected by T2INPPSPin selected by T4INPPSPin selected by T6INPPS