Introduction: INTERRUPT Using AVR:
- 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.
Step 1: 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
Step 2: Types of Interrupt
Step 3: Block Diagram of Interrupt
Step 4: Program for External Interrupt0 (INT0):
Any Query related Embedded System , IOT and Raspberry PI go to My Blog:
Be the First to Share