ADC timer interrupt when ready I have a microphone and I need as precise values as possible. I have been told by my teacher, that it is somehow possible to make a ADC timer interrupt, which would interrupt always when the value is ready, so that the reading itself would not slow the program down.
    I know, how to use timer interrupts to read the analog value every other ms or something and I even have a code that lets the ADC read automaticly and takes the value, but I need to make it take the value always when it's ready, so that I would have every value the ADC read. I tried to look into the datasheet, but it's too complicated for me.
   How can I achieve such thing? I am using arduino uno.  

this is the code I have that sets up the ADC interrupt:

  ADCSRA = 0;  
  ADCSRB = 0;  
  ADMUX = 0;  
  ADMUX |= (1 &lt;&lt; REFS0) + (1 &lt;&lt; REFS1);  
  ADMUX |= (1 &lt;&lt; ADLAR);  

  ADCSRA |= (1 &lt;&lt; ADATE); //enabble auto trigger  
  ADCSRA |= (1 &lt;&lt; ADIE); //enable interrupts when measurement complete  
  ADCSRA |= (1 &lt;&lt; ADEN); //enable ADC  
  ADCSRA |= (1 &lt;&lt; ADSC);  
  ADCSRA |= 0b010;  

ISR(ADC_vect) {//when new ADC value ready
  af = af + ADCH;
  aaf++;
}


I found this on the internet, but it didn't work as I expected.
it is somehow possible to make a ADC timer interrupt


The ADC and the timers are two different things. If you mean a timer interrupt, I'm not sure why you would want that. If you mean an ADC interrupt, yes you can do do that.

Here is some example code from my page about the ADC which shows using the interrupt (on a Uno):

const byte adcPin = 0;
volatile int adcReading;
volatile boolean adcDone;
boolean adcStarted;

void setup ()
{
  Serial.begin (115200);
  ADCSRA =  bit (ADEN);                      // turn ADC on
  ADCSRA |= bit (ADPS0) |  bit (ADPS1) | bit (ADPS2);  // Prescaler of 128
  ADMUX  =  bit (REFS0) | (adcPin &amp; 0x07);    // AVcc and select input port

}  // end of setup

// ADC complete ISR
ISR (ADC_vect)
  {
  adcReading = ADC;
  adcDone = true;  
  }  // end of ADC_vect

void loop ()
{
  // if last reading finished, process it
  if (adcDone)
    {
    adcStarted = false;

    // do something with the reading, for example, print it
    Serial.println (adcReading);
    delay (500);

    adcDone = false;
    }

  // if we aren't taking a reading, start a new one
  if (!adcStarted)
    {
    adcStarted = true;
    // start the conversion
    ADCSRA |= bit (ADSC) | bit (ADIE);
    }    

  // do other stuff here

}  // end of loop




I should point out that if you do an analogRead it blocks until the read is done, so the very next line to be executed after analogRead will be when the data is ready.