You can if you want.... I gave you this to show how I would do it.Can't we do this in assembly??
and please explain this..
8 bit PWM.. The timer0 has an 8 bit register.. if you make a pulse width of
64 counts high with 192 counts low... 64 + 192 = 256........... 25%
128 counts high with 128 counts low... 128 +128 = 256......... 50%
192 counts high with 64 counts low... 192 + 64 = 256........... 75%
The amount of bits used defines the accuracy.
You could have a 7 bit running at 4khz.. but you will only have 128 bits precision.
Last edited: