ATMega8 with 8Mhz internal oscillator, calibrated, used in my project.
Also using 32.768 Khz external crystal for timer 2 as async CTC mode with an interrupt.
Inaddidion using ADC with left adjusted result, 64 presclar.
ADC value checking is in an end less loop.
I am counting mili seconds, for this, incrementing a global varialble in Timer 2 CTC Interrupt and checking if it exceeds the set value to be counted.
If i use Timer alone (Remove ADC code) then, timer 2 gives me perfect result as expected.
But if ADC + Timer is used then Timer becomes FAST. i.e. when i set 9000 ms to count and give me a signal, then it signals me at 5670 ms.
Why timer 2 goes fast with ADC?