I have to agree with Mr E, HPWM is definitely the way to go. Once you set it it keeps on running until PWM which needs to be refresh all the time. We use an op-amp with high input impedence along with a small capacitor attached to the IO so that we can do other things with out having to refresh all the time. It's not a smooth an output as the HPWM but it does work. The capacitor slowly discharges through the op-amp.