Bruce,
Why should it be loaded with 249?
If I calculate the possible resolution with this given formula, it makes exactly 10 bits with PR2 set to 255 "+1".
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2417&stc=1&d=120549250 2">
I have to admit that the PWM calculation is still a mystery to me; I only roughtly understand the different parameters involved.
But this is exactly why I would like to understand where this value "249" comes from.
Tosc is a fourth of one microsecond (using the 4MHz XTal), isnt 'it?
Bookmarks