INTERRUPT Using AVR:
by embeddedbymedhavi in Circuits > Microcontrollers
725 Views, 1 Favorites, 0 Comments
INTERRUPT Using AVR:
![interrupt avr 3.jpg](/proxy/?url=https://content.instructables.com/FU1/K4X4/KCG8FQF6/FU1K4X4KCG8FQF6.jpg&filename=interrupt avr 3.jpg)
Interrupts:
- An interrupt is an external or internal event that interrupts the microcontroller to inform it that a device needs its service.
- Interrupts vs. Polling • A single microcontroller can serve several devices. •
- There are two ways to do that: – interrupts – Polling. •
- The program which is associated with the interrupt is called the interrupt service routine (ISR) or interrupt handler.
Steps in Executing an Interrupt:
- Finish current instruction and saves the PC on stack.
- Jumps to a fixed location in memory depend on type of interrupt
- Starts to execute the interrupt service routine until RETI (return from interrupt)
- Upon executing the RETI the microcontroller returns to the place where it was interrupted. Get pop PC from stack
Types of Interrupt
![interrupt avr 1.jpg](/proxy/?url=https://content.instructables.com/F3W/WB19/KCG8FQE2/F3WWB19KCG8FQE2.jpg&filename=interrupt avr 1.jpg)
Block Diagram of Interrupt
![interrupt avr.jpg](/proxy/?url=https://content.instructables.com/FHI/AFA3/KCG8FQG1/FHIAFA3KCG8FQG1.jpg&filename=interrupt avr.jpg)
Program for External Interrupt0 (INT0):
Downloads
Any Query related Embedded System , IOT and Raspberry PI go to My Blog: