Datasheet

2011-2012 Microchip Technology Inc. DS75018C-page 179
dsPIC33FJ06GS001/101A/102A/202A and dsPIC33FJ09GS302
14.0 OUTPUT COMPARE
The output compare module can select either Timer1 or
Timer2 for its time base. The module compares the
value of the timer with the value of one or two Compare
registers, depending on the operating mode selected.
The state of the output pin changes when the timer
value matches the Output Compare register value. The
output compare module generates either a single
output pulse, or a sequence of output pulses, by
changing the state of the output pin on the compare
match events. The output compare module can also
generate interrupts on compare match events.
The output compare module has multiple operating
modes:
Active-Low One-Shot mode
Active-High One-Shot mode
Toggle mode
Delayed One-Shot mode
Continuous Pulse mode
PWM mode without Fault Protection
PWM mode with Fault Protection
If a Fault condition is detected on the OCFA pin, the
output pin(s) of the output compare module are placed
in tri-state. The user may elect to use a pull-down or
pull-up resistor on the PWM pin to provide for a desired
state if a Fault condition occurs.
FIGURE 14-1: OUTPUT COMPARE MODULE BLOCK DIAGRAM
Note 1: This data sheet summarizes the features
of the dsPIC33FJ06GS001/101A/102A/
202A and dsPIC33FJ09GS302 families
of devices. It is not intended to be a
comprehensive reference source. To
complement the information in this data
sheet, refer to Section 13. “Output
Compare” (DS70209) in the “dsPIC33F/
PIC24H Family Reference Manual,
which is available on the Microchip web
site (www.microchip.com).
2: Some registers and associated bits
described in this section may not be
available on all devices. Refer to
Section 4.0 “Memory Organization” in
this data sheet for device-specific register
and bit information.
Note: The output compare module is not
implemented in the dsPIC33FJ06GS001
device.
OC1R
Comparator
Output
Logic
OCM<2:0>
Output Enable
OC1
Set Flag bit,
OC1IF
OC1RS
Mode Select
3
16
OCFA
TMR2
QS
R
TMR2
Rollover