analog read interupt

looking at an idea, that needs us to read quite a few analog inputs,
basicaly all the alog in pins of the arduino.

so thought is,
I understand alogread is quite slow, as I guess the adcs have to integrate.

anyone got any code ideas for putting the alog read into a sort of automatic mode,
where the analog reads happen in the background, and the answeres are presented.
An interupt ?

that way I can get on with the maths as fast as I can,
and the latest analog read will be ready for me as I need it,

If you look at the source of "analogRead", you'll see that it breaks down into three distinct sections.

  1. setup the input mux and start the conversion
  2. Idle wait for the conversion to finish
  3. read the result.

It is very simple to pick apart - no interrupts required.

And don't be confused, there is only one ADC on the chip, you can't run conversions in parallel.