Hi again,
I changed my sine entries to 72 samples from 0 to 350 in steps of 5. According to calculations above, TMR0 interrupt is generated every 141us (88*1.6us) so for 142 samples the frequency is 50 Hz (1/0.02 s). However, I am getting at the output 40 Hz sine wave! What I am doing wrong ? I used 72 samples instead of 142 also as it is one complete sine wave but I still get 40 Hz!
In the first post, the sine table had 19 entries from 270 - 90 in steps 10 and I was getting 50 Hz sine wave.
I am simulating my program on Proteus 7.5.
Thanks
Bookmarks