INTERRUPT Using AVR:

by embeddedbymedhavi in Circuits > Microcontrollers

705 Views, 0 Favorites, 0 Comments

INTERRUPT Using AVR:

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

Block Diagram of Interrupt

interrupt avr.jpg

Program for External Interrupt0 (INT0):

Downloads

Any Query related Embedded System , IOT and Raspberry PI go to My Blog:

embeddedbymedhavi