ADC interrupt using for?

What is the ADC interrrupt normal using for ?

Informs the program that the ADC conversion is complete.

For non blocking ADC reading or a sample of multiple channels or readings of the same channel.

It's useful when combined with a nap. With the processor sleeping the reading has significantly less jitter / noise. The interrupt wakes the processor when the conversion is finished.

Because of the nap, there is a reduction in power consumption.

It facilitates continuous conversions.

1 Like

@ohmybae, your topic has been moved to a more suitable location on the forum as this has nothing to do with Interfacing with Software on the Computer".

1 Like

Non-blocking ananlog reads can be achieved without interrupts :wink:

1 Like

It is also useful with the autotriggering feature.

It means you can reliably acquire input readings without having to block waiting for the ADC (110µs is a long time for a microcontroller to sit on its hands doing nothing).

You might use a timer interrupt to fire the ADC conversion automatically at regular intervals, and the ADC interrupt to read the result into a buffer. This frees your main program to do other things, so long as it remembers to check the buffer hasn't overflowed and collects/processes the data.

DSP requires sampling at precisely spaced intervals, so using hardware rather than software to time ADC conversions is often a requirement.