Would it make more sense to sample 8 bits? Without dividing by 256 one full turn of the pot repeats 0-100% duty cycle many times. I admit being new to the world of programming and working with the internals of microprocessors.word filled by 10bit, result divided by 256?
Well yes and no. Yes if you're using HPWM, no if you set the CCP register yourself as in the ASM code.
One thing is sure, 10 bits/256, will not give you a 8 bit results... if you divide it by 4... yes.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks