I put a scope on CLKOUT and looked at it and the PWM output pin.
Everything seems proportionate.
At the lowest oscillator setting (OSCON set for 125 kHz, so CLKOUT is 31.25 kHz),
HPWM 1,127,8000
gives a nice 250 Hz square wave.
Since the ratio of 4000/125 = 32, 8000/32 should (and does) equal 250.
I haven't determined maxima and minima yet, but I'll play with that next.
Bookmarks