CCP/ECCP Capture Mode Prescaler

Last modified by Microchip on 2024/01/26 15:57

The prescaler can delay reaction to an event on the CCPx pin. The capture of the Timer1 value can be delayed to capture on the first edge (falling or rising), the fourth edge (rising only), or the 16th edge (rising only). These three prescaler settings are determined by the CCPxM<3:0> bits of the CCPxCON register.

  • Prescaler divide by 1
    • Capture mode: every falling edge (CCPxM<3:0> = 0100)
    • Capture mode: every rising edge (CCPxM<3:0> = 0101)
  • Prescaler divide by 4
    • Capture mode: every fourth rising edge (CCPxM<3:0> = 0110)
  • Prescaler divide by 16
    • Capture mode: every 16th rising edge (CCPxM<3:0> = 0111)

Capture Mode Prescaler

Whenever the CCP module is turned off, or the CCP module is not in Capture mode, the prescaler counter is cleared. Any Reset will also clear the prescaler counter.

Switching from one capture prescaler to another does not clear the prescaler and may generate a false interrupt. To avoid this unexpected operation, turn off the module by clearing the CCPxCON register before changing the prescaler.