Quote Originally Posted by peu View Post
.... I don't undertand what you implied by reading that section of the DS. ...
That's just his little way of saying "I don't Know, go read the datasheet or something."<hr>

When an HPWM command executes, it treats it like it's the First time, and sets up every register needed to run PWM with the CCP module.

Changing CCP and TMR2 registers while the CCP is running PWM will cause "false pulses", Cycle Resets or elongation.

It would be nice if there was an HPWM_UPDATE command that only changed the dutycycle, without messing with the other registers. But there isn't.

If you need a totally "Glitch Free" PWM signal, then you'll have to modify the dutycycle manually. You can still use HPWM to set everything up. And then just modify the dutycycle later, after the PWM is running.

If you haven't already, you should get a copy of mister_e's PicMultiCalc.exe

It'll help figure out what values to use for the dutycycles.
http://www.mister-e.org/pages/utilitiespag.html

HTH,