Go Down

Topic: Where Interrupt Routine Returns To After Execution (Read 1 time) previous topic - next topic

bob.augustine

Hello,

I'm new at programming the Arduino and had a question about it's use of interrupts.

After the Arduino finishes executing the interrupt routine, does it return to where it was when the interrupt was triggered?  Or does it restart the loop function?

Thanks!

AWOL

Quote
does it return to where it was when the interrupt was triggered

Yes.

AlphaBeta

Quote
Or does it restart the loop function?


No.


Sorry guys, just HAD to.  :D

AWOL

Quote
No.


Sorry guys, just HAD to.  


When a guy's gotta do what a guy's gotta do.

Sean

And any global variables that are set by your interrupt service routine probably should be "volatile" as they can be changed at any time and the reentrant part needs to know this. See the page below as it better explains:

http://arduino.cc/en/Reference/Volatile

Go Up