thank you for the explaning,
so, can i conclude that it doesnt matter to set prescale 1,4 or 16 since the value of PR2 will be change??
for instance,
prescale = 16 ,PWM freq =5kHz for 20M Fosc
from equation PR2+1 = 1 / (TOsc * 4 * Prescaler * PWM Frequency)
my PR2 should be 63.5
is it any different using prescale=4 with PR2=249 compare to the prescale=16 with PR2=63.5 because it turns out my PWM waveform doesnt seem to be same when i compare both
photoelectric
Bookmarks