I want to calculate a PWM period from 163,200/x where x is a word variable in the range 640 to about 2000. I could do it thus: 40800/x*4 (163200/4=40800) but then the result loses resolution and changes in steps of 4.
Is there a way to rearrange the arithmetic to achieve resolution in steps of 1?
Is there a way to rearrange the arithmetic to achieve resolution in steps of 1?