Microchip Technology AC164139 Data Sheet

Page of 408
PIC24FJ256DA210 FAMILY
DS39969B-page 204
 2010 Microchip Technology Inc.
FIGURE 14-2:
OUTPUT COMPARE BLOCK DIAGRAM (DOUBLE-BUFFERED, 16-BIT PWM MODE)
14.3.1
PWM PERIOD
The PWM period is specified by writing to PRy, the
Timer Period register. The PWM period can be
calculated using Equation 14-1.
EQUATION 14-1:
CALCULATING THE PWM PERIOD
(1)
OCxR and
Comparator
OCxTMR
OCxCON1
OCxCON2
OC Output and
OCx Interrupt
OCx Pin
(1)
OCxRS Buffer
Comparator
Fault Logic
Match 
Match 
Trigger and
Sync Logic
Clock
Select
Increment
Reset
OC Clock
Sources
Trigger and
Sync Sources
Reset
Match Event
OCFA/OCFB
(2)
OCTSELx
SYNCSELx
TRIGSTAT
TRIGMODE
OCTRIG
OCMx
OCINV
OCTRIS
FLTOUT
FLTTRIEN
FLTMD
ENFLT<2:0>
OCFLT<2:0>
OCxRS
Event
Event
Rollover
Rollover/Reset
Rollover/Reset
Note 1: The OCx outputs must be assigned to an available RPn pin before use. See Section 10.4 “Peripheral Pin
Select (PPS)” for more information.
2: The OCFA/OCFB fault inputs must be assigned to an available RPn/RPIn pin before use. SeSection 10.4
OCxR and
DCB<1:0>
DCB<1:0>
DCB<1:0> Buffers
Note 1:
Based on T
CY
 = T
OSC
 * 2; Doze mode and PLL are disabled.
PWM Period = [(PRy) + 1 • T
CY
 • (Timer Prescale Value)
where:
PWM Frequency = 1/[PWM Period]
Note:
A PRy value of N will produce a PWM period of N + 1 time base count cycles. For example, a value of 7
written into the PRy register will yield a period consisting of 8 time base cycles.