27.4.2.2 32-Bit Timer Mode

The 32-Bit Timer mode is selected when T32 = 1. In this mode, CCPxTMR will be used as single 32-bit register.

This mode provides a simple timer function when it is important to track long time periods. It is useful for the following functions:
  • Periodic CPU Interrupts
  • Synchronization and Trigger Generation for Other CCP Modules
  • Periodic ADC Conversion Triggering
  • Periodic Wake from Sleep (if an Appropriate Clock Source is Available)

No input or output functions are available from the CCP module in this operating mode.

Figure 27-4. 32-Bit Timer Mode

When external synchronization is not selected (SYNC[4:0] = 00000), the CCPxPR register sets the count period for the timer. A match between the CCPxTMR and the CCPxPR register also automatically generates the Sync output signal whenever the module is enabled (CCPON = 1).

To use the module in 32-Bit Timer mode:
  1. Set CCSEL = 0 to select the Time Base/Output Compare mode of the module.
  2. Set T32 = 1 to select the 32-bit time base operation.
  3. Set MOD[3:0] = 0000 to select the Time Base mode.
  4. Set SYNC[4:0] to the desired timer synchronization source:
    • Configure and enable the external source selected by SYNC[4:0] before enabling the timer.
    • If the timer is not using an external Sync source (SYNC[4:0] = 00000), or if the module is synchronizing to itself (SYNC[4:0] selects the module’s own value as a Sync source), write the desired count period to CCPxPR.
  5. Enable the module by setting the CCPON bit.