21.6.6 Edge-Triggered One Shot Mode

The Edge-Triggered One Shot modes start the timer on an edge from the external signal input, after the ON bit is set, and clear the ON bit when the timer matches the PRx period value. The following edges will start the timer:

  • Rising edge (MODE[4:0] = 01001)
  • Falling edge (MODE[4:0] = 01010)
  • Rising or Falling edge (MODE[4:0] = 01011)

If the timer is halted by clearing the ON bit, then another TMRx_ers edge is required after the ON bit is set to resume counting. Figure 21-8 illustrates operation in the rising edge One Shot mode.

When Edge-Triggered One Shot mode is used in conjunction with the CCP, the edge-trigger will activate the PWM drive, and the PWM drive will deactivate when the timer matches the CCPRx pulse-width value and stay deactivated when the timer halts at the PRx period count match.

Figure 21-8. Edge-Triggered One Shot Mode Timing Diagram (MODE = 01001)
Note:
  1. BSF and BCF represent Bit-Set File and Bit-Clear File instructions executed by the CPU to set or clear the ON bit of TxCON. CPU execution is asynchronous to the timer clock input.