from data-sheets i figured out that if i enable ADC by ADEN, it shouldn't start any conversion without ADSC.
But for this moment it seems like that's always in continuous mode even if I never touch ADSC flag.
Atmega16 @ 16MHz (but exactly same behavior i have observed also on ATMEGA644P)
Serial over FTDI @ 250kbps (tested and functional)
Timer 0 interrupts every 1/62.5second -> toggling output pin PD6 (also tested and functional - output frequency about 31,119Hz)
ADC interrupt just toggles PD7 (for testing purpose)
Interrupt handlers are functional, no unexpected resets.
Original Goal: timer 0 compare triggering ADC conversion. However ADC is always free running -
for example if i set:
ADMUX = _BV(REFS1) | _BV(REFS0); SFIOR = 3 << ADTS0; // timer 0 compare match trigger ADCSRA= _BV(ADEN) | _BV(ADIE) |/* _BV(ADATE) |*/ 7; // prescaler /128, enable ADC + interrupt
I can measure on PD7 (toggled by ADC interrupt) frequency about 4,46kHz
If i set ADC prescaler to dividing by 32 -> about 15,622kHz
If i enable ADATE it's still free running (ADC interrupt is far more faster than Timer0)
Am I such bad in reading of data-sheet? Did I miss something?