Specifications
© 2008-2012 Microchip Technology Inc. DS70323E-page 43-91
Section 43. High-Speed PWM
High-Speed PWM
43
43.13 IMMEDIATE UPDATE OF PWM DUTY CYCLE
The high performance PWM control-loop application requires a maximum duty cycle update rate.
Setting the IUE bit (PWMCONx<0>) enables this feature. In a closed-loop control application,
any delay between the sensing of a system state and the subsequent output of PWM control
signals that drive the application reduces the loop stability. Setting the IUE bit (PWMCONx<0>)
minimizes the delay between writing the duty cycle registers and the response of the PWM
generators to that change.
The IUE bit (PWMCONx<0>) enables the user-assigned application to update the duty cycle
values immediately after writing to the duty cycle registers, than waiting until the end of the time
base period. If the IUE bit (PWMCONx<0>) is set, an immediate update of the duty cycle is
enabled. If the bit is cleared, immediate update of the duty cycle is disabled. The following three
cases are possible when immediate update is enabled:
• Case 1: If the PWM output is active at the time the new duty cycle is written and the new
duty cycle is greater than the current time base value, the PWM pulse width is lengthened.
• Case 2: If the PWM output is active at the time the new duty cycle value is written and the
new duty cycle is less than the current time base value, the PWM pulse width is shortened.
• Case 3: If the PWM output is inactive when the new duty cycle value is written and the new
duty cycle is greater than the current time base value, the PWM output becomes active
immediately and remains active for the newly written duty cycle value.
The duty cycle update times when immediate updates are enabled (IUE = 1) is illustrated in
Figure 43-45. The configuration of immediate update selection is shown in Example 43-30.
Figure 43-45: Duty Cycle Update Times When Immediate Updates are Enabled (IUE = 1)
Example 43-30: Immediate Update Selection
Note: In case of the occurrence of case 3 in Complementary mode, that is, if the PWM
output is inactive when the new duty cycle value is written and the new duty cycle
is greater than the current time base value, the PWM output becomes active
immediately and remains active for the newly written duty cycle value. However,
whenever the PWM output becomes active, the dead times will not be asserted
between PWMxH and PWMxL.
50%
90% 10% 90%
Latest Duty Cycle
Value Written
PWM Output
PMTMR Value
to PDCx
New Values Written to PDCx Register
Case 1
Case 2
Case 3
/* Enable Immediate update of PWM */
PTCONbits.EIPU = 1;
/* Update Active period register immediately */
PWMCON1bits.IUE = 1;
/* Update active duty cycle, phase offset, and independent time period
registers immediately */