Interrupt Trigger Analog Input

Hi,
I want to make a Interrupt routine with my Arduino DUE which triggers when the data of the Analog Input is read in. This should happen periodically each time the Analog input has converted new data. Unfortunately, I'm not very good in programming microcontrollers, so what is important to take care of or how do I write the setup for the interrupt?
Thanks for your help!

Why do you think you need to use interrupts?

What exactly are you trying to do? The more information you provide the better responses you will get.

For a control, the setpoint and actual value are to be read in and an output is to be given out according to a controller rule.
This should happen as fast as possible. As far as I know, reading the data takes the most time. Therefore, I want to start the interrupt, as soon as the new data is available

All an interrupt does... is... well... interrupt your code that is running, to run some other code, then continue with the original code. It doesn't always mean things will be faster overall. You still need to read the input, and you still need to write the output.

What does this mean?

How fast exactly? Microcontrollers are are very fast if you use (code) them correctly.

Provide more details about your project... you still haven't supplied any information that indicates you need to use interrupts.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.