English
Language : 

PIC24FJ16MC101_12 Datasheet, PDF (152/350 Pages) Microchip Technology – 16-bit Microcontrollers (up to 32 KB Flash and 2 KB SRAM)
PIC24FJ16MC101/102 AND PIC24FJ32MC101/102/104
14.1 Output Compare Modes
Configure the Output Compare modes by setting the
appropriate Output Compare Mode bits (OCM<2:0>) in
the Output Compare Control register (OCxCON<2:0>).
Table 14-1 lists the different bit settings for the Output
Compare modes. Figure 14-2 illustrates the output
compare operation for various modes. The user
application must disable the associated timer when
writing to the output compare control registers to avoid
malfunctions.
Note:
See Section 16. “Output Compare”
(DS39706) in the “PIC24F Family Refer-
ence Manual” (DS70209) for OCxR and
OCxRS register restrictions.
TABLE 14-1: OUTPUT COMPARE MODES
OCM<2:0>
Mode
OCx Pin Initial State
000 Module Disabled
Controlled by GPIO register
001 Active-Low One-Shot
0
010 Active-High One-Shot
1
011 Toggle Mode
Current output is maintained
100 Delayed One-Shot
0
101 Continuous Pulse mode
0
110 PWM mode without fault
protection
0, if OCxR is zero
1, if OCxR is non-zero
111 PWM mode with fault protection 0, if OCxR is zero
1, if OCxR is non-zero
OCx Interrupt Generation
—
OCx Rising edge
OCx Falling edge
OCx Rising and Falling edge
OCx Falling edge
OCx Falling edge
No interrupt
OCFA Falling edge for OC1 to OC4
FIGURE 14-2:
OUTPUT COMPARE OPERATION
Output Compare
Mode enabled
Timer is reset on
period match
OCxRS
TMRy
OCxR
Active-Low One-Shot
(OCM = 001)
Active-High One-Shot
(OCM = 010)
Toggle Mode
(OCM = 011)
Delayed One-Shot
(OCM = 100)
Continuous Pulse Mode
(OCM = 101)
PWM Mode
(OCM = 110 or 111)
DS39997C-page 152
Preliminary
© 2011-2012 Microchip Technology Inc.