Interrupts
Interrupts
Interrupts
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
What happens?<br />
• So what happens when an interrupt (IRQ) occurs?<br />
1/4/2010<br />
8. Then the ISR is executed<br />
1. The INT0 flag in EIFR is cleared<br />
2. If there are any “pushes”, they get executed<br />
9. The remainder of the ISR is executed until (almost) the end<br />
10. Anything pushed onto the stack is popped off in the reverse order<br />
11. The global interrupt flag in the status register is set again to re-enable<br />
interrupts<br />
12. The RTI instruction is executed<br />
1. The INT0 flag in EIFR is set again<br />
13. The “old” address is popped off the stack and loaded into the PC<br />
14. Main program continues execution where it left off<br />
32