Forum Discussion
Altera_Forum
Honored Contributor
15 years agoFrom the Altera Documentation :
--- Quote Start --- The timer's actual period is one cycle greater than the value stored in the period_n registers because the counter assumes the value zero for one clock cycle. --- Quote End --- . That mean a division by 81 instead of 80 that should produce interrupt rate at ~1975.3kHz and a sine wave frequency of 39.5 kHz (you have 50 points per sine period if I understand well). So that does not correspond to your value but it is already a difference in relation to the theory. Maybe first try to toggle a pin at each interrupt to check the interrupt rate, and after that is verified, check your sine wave frequency.