How do I remove "jitter" when detecting frequency of Sine Wave
Your interrupt seems to occur at 8 kHz. There are 2 obvious jitter causes that I can see.
First of all if $$\frac{f_s}{f} \neq N$$ where N is an integer, $f_s$ is the sampling frequency and $f$ the signal frequency, you will get jitter since the sampling instants will not be &quot;periodic&quot;. Try to set f to 80 Hz, you will have 100 samples per period, check if that fixes your jitter.
Secondly, there could be latency caused by your ADC (is it integrated to your microcontroller? SPI, I2C?), latency caused by the ISR, etc. that could cause the jitter.