Quote Originally Posted by Cyborg View Post
when frequency is set to 50 Hz (ADC = 200),
timer0 reload value = FFFFh - 5Mhz / (36*(8/4)(200)) = 65535 - 347 = 65188
hi,
i am referring to application note AN843 for my project, and i am having some difficulties calculating some parameters
i have been through your post, and it helped me quite a lot, but i have some things to clarify with you
how do you set the frequency of the sine wave from the potentiometer
i mean since it is a 10bit ADC, reference setting from 0-5V gives me 0-1023,my question is how does your input vary with the frequency(5V--->200ADC-->(200/4=50Hz)
and secondly what does the value of timer0 reload value correspond to (65188)
else my value of prescalar is 16, and as per your equations i do get the value of 50Hz when i use the ADC=200 value, but i do not understand how you obtain that value
thanks in anticipation