I tinkered around and found that with my 8mhz int clock and 2khz pwm the prescaler was being set to 1 and ticks was 1000 per cycle. 50% duty Time on/off was 500 ticks each. This suggests that resolution can be increased to 0.1% by changing DutyCycle to a word variable and using 500 instead of 50 to represent 50% duty. I have adjsted the calculation so it now ranges from 0-1000 in steps of 1 instead of steps of 10. I also removed all the calculation routines as ticks are now known as is prescaler etc. That save quite a few bytes as well

Darrel any comments?

Peter