Hi,
I'll admit, I don't quite follow what you're doing here but (as far as I can see) with the increased resolution you must change either "step change" per update (what Richard suggest but which basically defeats the incresed resolution) OR change the update rate if you want to keep the orignial "cycle time".
If the CASE code, which is what's actually updating the PWM dutycycle, is currently executed at 1Hz then changing that to 16Hz will allow B_PWM to reach 4095 in the same amount of time as it's currently taking to reach 255.
/Henrik.
EDIT: Ah, Steve posted while I was typing and retyping....
Bookmarks