English
Language : 

PIC24FJ256GB110-I Datasheet, PDF (161/328 Pages) Microchip Technology – 64/80/100-Pin, 16-Bit Flash Microcontrollers with USB On-The-Go (OTG)
PIC24FJ256GB110 FAMILY
13.0 OUTPUT COMPARE WITH
DEDICATED TIMERS
Note:
This data sheet summarizes the features
of this group of PIC24F devices. It is not
intended to be a comprehensive reference
source. For more information, refer to the
“PIC24F Family Reference Manual”.
Devices in the PIC24FJ256GB110 family all feature
9 independent output compare modules. Each of these
modules offers a wide range of configuration and oper-
ating options for generating pulse trains on internal
device events, and can produce pulse-width modulated
waveforms for driving power applications.
Key features of the output compare module include:
• Hardware-configurable for 32-bit operation in all
modes by cascading two adjacent modules
• Synchronous and Trigger modes of output
compare operation, with up to 30 user-selectable
trigger/sync sources available
• Two separate period registers (a main register,
OCxR, and a secondary register, OCxRS) for
greater flexibility in generating pulses of varying
widths
• Configurable for single-pulse or continuous pulse
generation on an output event, or continuous
PWM waveform generation
• Up to 6 clock sources available for each module,
driving a separate internal 16-bit counter
13.1 General Operating Modes
13.1.1 SYNCHRONOUS AND TRIGGER
MODES
By default, the output compare module operates in a
free-running mode. The internal 16-bit counter,
OCxTMR, runs counts up continuously, wrapping
around from FFFFh to 0000h on each overflow, with its
period synchronized to the selected external clock
source. Compare or PWM events are generated each
time a match between the internal counter and one of
the period registers occurs.
In Synchronous mode, the module begins performing
its compare or PWM operation as soon as its selected
clock source is enabled. Whenever an event occurs on
the selected sync source, the module’s internal counter
is reset. In Trigger mode, the module waits for a sync
event from another internal module to occur before
allowing the counter to run.
Free-running mode is selected by default, or any time
that the SYNCSEL bits (OCxCON2<4:0>) are set to
‘00000’. Synchronous or Trigger modes are selected
any time the SYNCSEL bits are set to any value except
‘00000’. The OCTRIG bit (OCxCON2<7>) selects
either Synchronous or Trigger mode; setting the bit
selects Trigger mode operation. In both modes, the
SYNCSEL bits determine the sync/trigger source.
13.1.2 CASCADED (32-BIT) MODE
By default, each module operates independently with
its own set of 16-bit timer and duty cycle registers. To
increase resolution, adjacent even and odd modules
can be configured to function as a single 32-bit module.
(For example, modules 1 and 2 are paired, as are mod-
ules 3 and 4, and so on.) The odd-numbered module
(OCx) provides the Least Significant 16 bits of the
32-bit register pairs, and the even module (OCy)
provides the Most Significant 16 bits. Wraparounds of
the OCx registers cause an increment of their
corresponding OCy registers.
Cascaded operation is configured in hardware by setting
the OC32 bits (OCxCON2<8>) for both modules.
© 2008 Microchip Technology Inc.
Preliminary
DS39897B-page 159