To get Glitch-Free, you have to synchronize the updates with Timer2.

The HPWM10 module does that with 10-bit resolution, and works just like the HPWM command.
http://www.picbasic.co.uk/forum/show...7805#post37805

But at your higher frequency, you'll still need to do it manually.
It does show how to though.

hth,