PIC24FJ64GA306-I/MR Microchip Technology, PIC24FJ64GA306-I/MR Datasheet - Page 211

no-image

PIC24FJ64GA306-I/MR

Manufacturer Part Number
PIC24FJ64GA306-I/MR
Description
16-bit, 16 MIPS, 64 KB Flash, 8 KB RAM, 53 I/O, LCD, XLP W/Vbat 64 QFN 9x9x0.9mm
Manufacturer
Microchip Technology
Datasheet
15.0
Devices in the PIC24FJ128GA310 family all feature
seven independent output compare modules. Each of
these modules offers a wide range of configuration and
operating 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
• Synchronous and Trigger modes of output
• Two separate Period registers (a main register,
• Configurable for single pulse or continuous pulse
• Up to 6 clock sources available for each module,
15.1
15.1.1
When the output compare module operates in a
Free-Running mode, the internal 16-bit counter,
OCxTMR, runs counts up continuously, wrapping
around from 0xFFFF to 0x0000 on each overflow. Its
period is 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.
 2010-2011 Microchip Technology Inc.
Note:
modes by cascading two adjacent modules
compare operation, with up to 31 user-selectable
trigger/sync sources available
OCxR, and a secondary register, OCxRS) for
greater flexibility in generating pulses of varying
widths
generation on an output event, or continuous
PWM waveform generation
driving a separate internal 16-bit counter
OUTPUT COMPARE WITH
DEDICATED TIMERS
General Operating Modes
Section 35. “Output Compare with
Dedicated Timer” (DS39723). The infor-
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
mation in this data sheet supersedes the
information in the FRM.
SYNCHRONOUS AND TRIGGER
MODES
Family
Reference
Manual”,
PIC24FJ128GA310 FAMILY
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.
15.1.2
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
Modules 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. Wrap-arounds of
the OCx registers cause an increment of their
corresponding OCy registers.
Cascaded operation is configured in hardware by set-
ting the OC32 bit (OCxCON2<8>) for both modules.
For more details on cascading, refer to the “PIC24F
Family Reference Manual”, Section 35. “Output
Compare with Dedicated Timer” (DS39723).
CASCADED (32-BIT) MODE
DS39996F-page 211

Related parts for PIC24FJ64GA306-I/MR