DSPIC33FJ12MC202 Microchip Technology Inc., DSPIC33FJ12MC202 Datasheet - Page 150

no-image

DSPIC33FJ12MC202

Manufacturer Part Number
DSPIC33FJ12MC202
Description
High-performance, 16-bit Digital Signal Controllers
Manufacturer
Microchip Technology Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
DSPIC33FJ12MC202-E/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
DSPIC33FJ12MC202-I/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
DSPIC33FJ12MC202-I/SO
0
Part Number:
DSPIC33FJ12MC202-I/SP
0
Part Number:
DSPIC33FJ12MC202-I/SS
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
dsPIC33FJ12MC201/202
FIGURE 14-3:
14.6
Center-aligned PWM signals are produced by the
module when the PWM time base is configured in an
Up/Down Count mode (see Figure 14-4).
The PWM compare output is driven to the active state
when the value of the Duty Cycle register matches the
value of PxTMR and the PWM time base is counting
downward (PTDIR = 1). The PWM compare output is
driven to the inactive state when the PWM time base is
counting upward (PTDIR = 0) and the value in the
PxTMR register matches the duty cycle value.
If the value in a particular Duty Cycle register is zero,
the output on the corresponding PWM pin is inactive for
the entire PWM period. In addition, the output on the
PWM pin is active for the entire PWM period if the value
in the Duty Cycle register is equal to the value held in
the PxTPER register.
FIGURE 14-4:
DS70265B-page 148
PxTPER
PxTPER
Cycle
Duty
0
0
Center-Aligned PWM
P
Value
Duty Cycle
X
TMR
Period/2
Period
EDGE-ALIGNED PWM
CENTER-ALIGNED PWM
Period
New Duty Cycle Latched
PTMR
Value
Preliminary
14.7
Three 16-bit Special Function Registers (PxDC1,
PxDC2, PxDC3) are used to specify duty cycle values
for the PWM module.
The value in each Duty Cycle register determines the
amount of time that the PWM output is active. The Duty
Cycle registers are 16 bits wide. The Least Significant
bit (LSb) of a Duty Cycle register determines whether
the PWM edge occurs in the beginning. Thus the PWM
resolution is effectively doubled.
14.7.1
The three PWM Duty Cycle registers are double-
buffered to allow glitchless updates of the PWM
outputs. For each duty cycle, there is a Duty Cycle
register that is accessible by the user application and
a second Duty Cycle register that holds the actual
compare value used in the present PWM period.
For edge-aligned PWM output, a new duty cycle value
will be updated whenever a match with the PxTPER
register occurs and PxTMR is reset. The contents of
the duty cycle buffers are automatically loaded into the
Duty Cycle registers when the PWM time base is
disabled (PTEN = 0) and the UDIS bit is cleared in
PWMxCON2.
When the PWM time base is in the Up/Down Count
mode, new duty cycle values are updated when the
value of the PxTMR register is zero, and the PWM time
base begins to count upward. The contents of the duty
cycle buffers are automatically loaded into the Duty
Cycle registers when the PWM time base is disabled
(PTEN = 0).
When the PWM time base is in the Up/Down Count
mode with double updates, new duty cycle values are
updated when the value of the PxTMR register is zero,
and when the value of the PxTMR register matches the
value in the PxTPER register. The contents of the duty
cycle buffers are automatically loaded into the Duty
Cycle registers when the PWM time base is disabled
(PTEN = 0).
PWM Duty Cycle Comparison
Units
DUTY CYCLE REGISTER BUFFERS
© 2007 Microchip Technology Inc.

Related parts for DSPIC33FJ12MC202