English
Language : 

PIC18LF24K Datasheet, PDF (257/594 Pages) –
PIC18(L)F26/45/46K40
20.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 20-9 illustrates operation in
the rising edge One-Shot mode.
When this mode is used in conjunction with the CCP
then 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 20-9:
EDGE-TRIGGERED ONE-SHOT MODE TIMING DIAGRAM
Rev. 10-000200B
5/30/2014
MODE
TMRx_clk
PRx
Instruction(1)
BSF
ON
TMRx_ers
TMRx
0
TMRx_out
TMRx_postscaled
12345
0b01001
5
BSF
0
BCF
1
2
PWM Duty
Cycle
3
PWM Output
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.
 2016 Microchip Technology Inc.
Preliminary
DS40001816C-page 257