SlideShare a Scribd company logo
WHAT ARE INTERRUPTS? 
Interrupts are: 
basically events that require immediate attention by the microcontroller. 
When an interrupt event occurs the microcontroller pause its current 
task and attend to the interrupt by executing an Interrupt Service 
Routine (ISR) at the end of the ISR the microcontroller returns to the 
task it had pause and continue its normal operations. 
How come? 
In order for the microcontroller to respond to an interrupt event the 
interrupt feature of the microcontroller must be enabled along with the 
specific interrupt. This is done by setting the Global Interrupt Enabled 
bit and the Interrupt Enable bit of the specific interrupt. 
2
SOME CONCEPTS 
ISR: 
An Interrupt Service Routine or Interrupt Handler is a piece of code that 
should be execute when an interrupt is triggered. Usually each enabled 
interrupt has its own ISR. Note That In AVR assembly language each 
ISR MUST end with the RETI instruction which indicates the end of the 
ISR. 
Interrupt Flags and Enabled bits: 
Each interrupt is associated with two (2) bits, an Interrupt Flag Bit and an 
Interrupt Enabled Bit. These bits are located in the I/O registers 
associated with the specific interrupt. 
 The interrupt flag bit is set whenever the interrupt event occur, Even if 
not the interrupt is enabled. 
3
SOME CONCEPTS 
The interrupt enabled bit is used to enable or disable a specific interrupt. 
Basically is tells the microcontroller whether or not it should respond to 
the interrupt if it is triggered. 
 For the AVR 8-bits microcontroller this bit is located in the Status I/O 
Register (SREG). The Global Interrupt Enabled is bit 7, the I bit, in the 
SREG. 
 interrupt vector : 
is the memory address of an interrupt handler. 
4
INTERRUPT TYPES 
Internal : 
The internal interrupts are associated with the microcontroller's peripherals 
EX: That is the Timer/Counter, Analog Comparator 
External: 
They are triggered via external pins 
Pins 6,7,8,9,25,26,27,28 
5

More Related Content

What's hot

ARM Processors
ARM ProcessorsARM Processors
ARM Processors
Mathivanan Natarajan
 
Timer & Interrupt Atmega16
Timer & Interrupt Atmega16Timer & Interrupt Atmega16
Timer & Interrupt Atmega16
Ramadan Ramadan
 
Spi in arm7(lpc2148)
Spi in arm7(lpc2148)Spi in arm7(lpc2148)
Spi in arm7(lpc2148)
Aarav Soni
 
Watch-dog Timer in LPC1768
Watch-dog Timer in LPC1768Watch-dog Timer in LPC1768
Watch-dog Timer in LPC1768
Srishti Kakade
 
Programmable Timer 8253/8254
Programmable Timer 8253/8254Programmable Timer 8253/8254
Programmable Timer 8253/8254
Muhammed Afsal Villan
 
Pic 18 microcontroller
Pic 18 microcontrollerPic 18 microcontroller
Pic 18 microcontroller
Ashish Ranjan
 
Microcontroller
MicrocontrollerMicrocontroller
Microcontroller
sachin patil
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller NotesDr.YNM
 
8051 Timer
8051 Timer8051 Timer
8051 Timer
Ramasubbu .P
 
Timer programming for 8051 using embedded c
Timer programming for 8051 using embedded cTimer programming for 8051 using embedded c
Timer programming for 8051 using embedded c
Vikas Dongre
 
DAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfDAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdf
Srikrishna Thota
 
ATPG Methods and Algorithms
ATPG Methods and AlgorithmsATPG Methods and Algorithms
ATPG Methods and AlgorithmsDeiptii Das
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
Aarav Soni
 
8051 MICROCONTROLLER
8051 MICROCONTROLLER 8051 MICROCONTROLLER
8051 MICROCONTROLLER
THANDAIAH PRABU
 
8051 ch9-950217
8051 ch9-9502178051 ch9-950217
8051 ch9-950217
Gopal Krishna Murthy C R
 
8051 serial communication-UART
8051 serial communication-UART8051 serial communication-UART
8051 serial communication-UART
Pantech ProLabs India Pvt Ltd
 
CPLD xc9500
CPLD xc9500CPLD xc9500
CPLD xc9500
A B Shinde
 
20EC602 VLSI Design.ppt
20EC602 VLSI Design.ppt20EC602 VLSI Design.ppt
20EC602 VLSI Design.ppt
ASureshkumar13
 

What's hot (20)

ARM Processors
ARM ProcessorsARM Processors
ARM Processors
 
Timer & Interrupt Atmega16
Timer & Interrupt Atmega16Timer & Interrupt Atmega16
Timer & Interrupt Atmega16
 
Logic families
Logic  familiesLogic  families
Logic families
 
Spi in arm7(lpc2148)
Spi in arm7(lpc2148)Spi in arm7(lpc2148)
Spi in arm7(lpc2148)
 
Watch-dog Timer in LPC1768
Watch-dog Timer in LPC1768Watch-dog Timer in LPC1768
Watch-dog Timer in LPC1768
 
Programmable Timer 8253/8254
Programmable Timer 8253/8254Programmable Timer 8253/8254
Programmable Timer 8253/8254
 
Pic 18 microcontroller
Pic 18 microcontrollerPic 18 microcontroller
Pic 18 microcontroller
 
Microcontroller
MicrocontrollerMicrocontroller
Microcontroller
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller Notes
 
8051 Timer
8051 Timer8051 Timer
8051 Timer
 
Timer programming for 8051 using embedded c
Timer programming for 8051 using embedded cTimer programming for 8051 using embedded c
Timer programming for 8051 using embedded c
 
DAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfDAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdf
 
ATPG Methods and Algorithms
ATPG Methods and AlgorithmsATPG Methods and Algorithms
ATPG Methods and Algorithms
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
 
8051 MICROCONTROLLER
8051 MICROCONTROLLER 8051 MICROCONTROLLER
8051 MICROCONTROLLER
 
Atmega32
Atmega32Atmega32
Atmega32
 
8051 ch9-950217
8051 ch9-9502178051 ch9-950217
8051 ch9-950217
 
8051 serial communication-UART
8051 serial communication-UART8051 serial communication-UART
8051 serial communication-UART
 
CPLD xc9500
CPLD xc9500CPLD xc9500
CPLD xc9500
 
20EC602 VLSI Design.ppt
20EC602 VLSI Design.ppt20EC602 VLSI Design.ppt
20EC602 VLSI Design.ppt
 

Viewers also liked

Storyboard%20 thriller 1 (2)
Storyboard%20 thriller 1 (2)Storyboard%20 thriller 1 (2)
Storyboard%20 thriller 1 (2)ReginaldKensah
 
Faculty Recruitment Chicago City Stats, Relocation Guide
Faculty Recruitment Chicago City Stats, Relocation Guide  Faculty Recruitment Chicago City Stats, Relocation Guide
Faculty Recruitment Chicago City Stats, Relocation Guide
Germaine Fung
 
POWER POINT. (MEDIA EVALUATION QUESTION 1)
POWER POINT. (MEDIA EVALUATION QUESTION 1)POWER POINT. (MEDIA EVALUATION QUESTION 1)
POWER POINT. (MEDIA EVALUATION QUESTION 1)ReginaldKensah
 
CoachFXLive Newsletter March 2016
CoachFXLive Newsletter March 2016CoachFXLive Newsletter March 2016
CoachFXLive Newsletter March 2016
CoachFX
 
180 rules and continuity editing
180 rules and continuity editing180 rules and continuity editing
180 rules and continuity editingReginaldKensah
 
Article Review Presentation-Shallon Gabel
Article Review Presentation-Shallon GabelArticle Review Presentation-Shallon Gabel
Article Review Presentation-Shallon GabelShallon Gabel
 
System on chip approach
System on chip approachSystem on chip approach
System on chip approach
Hamdy Fouad
 
Coating types and selection
Coating types and selectionCoating types and selection
Coating types and selection
kamal el sayed
 
лекция 3.основные понятия в химии вмс
лекция 3.основные понятия в химии вмс лекция 3.основные понятия в химии вмс
лекция 3.основные понятия в химии вмс NataRu
 
#MM9 Moodle MOOC - Group B final presentation
#MM9 Moodle MOOC - Group B final presentation #MM9 Moodle MOOC - Group B final presentation
#MM9 Moodle MOOC - Group B final presentation
Nives Torresi
 

Viewers also liked (12)

Storyboard%20 thriller 1 (2)
Storyboard%20 thriller 1 (2)Storyboard%20 thriller 1 (2)
Storyboard%20 thriller 1 (2)
 
Faculty Recruitment Chicago City Stats, Relocation Guide
Faculty Recruitment Chicago City Stats, Relocation Guide  Faculty Recruitment Chicago City Stats, Relocation Guide
Faculty Recruitment Chicago City Stats, Relocation Guide
 
POWER POINT. (MEDIA EVALUATION QUESTION 1)
POWER POINT. (MEDIA EVALUATION QUESTION 1)POWER POINT. (MEDIA EVALUATION QUESTION 1)
POWER POINT. (MEDIA EVALUATION QUESTION 1)
 
CoachFXLive Newsletter March 2016
CoachFXLive Newsletter March 2016CoachFXLive Newsletter March 2016
CoachFXLive Newsletter March 2016
 
180 rules and continuity editing
180 rules and continuity editing180 rules and continuity editing
180 rules and continuity editing
 
Article Review Presentation-Shallon Gabel
Article Review Presentation-Shallon GabelArticle Review Presentation-Shallon Gabel
Article Review Presentation-Shallon Gabel
 
System on chip approach
System on chip approachSystem on chip approach
System on chip approach
 
Coating types and selection
Coating types and selectionCoating types and selection
Coating types and selection
 
Alaska
AlaskaAlaska
Alaska
 
Gebeurtenis
GebeurtenisGebeurtenis
Gebeurtenis
 
лекция 3.основные понятия в химии вмс
лекция 3.основные понятия в химии вмс лекция 3.основные понятия в химии вмс
лекция 3.основные понятия в химии вмс
 
#MM9 Moodle MOOC - Group B final presentation
#MM9 Moodle MOOC - Group B final presentation #MM9 Moodle MOOC - Group B final presentation
#MM9 Moodle MOOC - Group B final presentation
 

Similar to Interrupts at AVR

Interrupt in ATMEGA328P.pptx
Interrupt in ATMEGA328P.pptxInterrupt in ATMEGA328P.pptx
Interrupt in ATMEGA328P.pptx
SujalKumar73
 
Unit 3 timer and counter and there application .pptx
Unit 3 timer and counter and there application .pptxUnit 3 timer and counter and there application .pptx
Unit 3 timer and counter and there application .pptx
naveen088888
 
Micro controller 8051 Interrupts
Micro controller 8051 InterruptsMicro controller 8051 Interrupts
Micro controller 8051 Interrupts
dharmesh nakum
 
Interrupts in 8051
Interrupts in 8051Interrupts in 8051
Interrupts in 8051
Sudhanshu Janwadkar
 
DPA
DPADPA
Interrupts
InterruptsInterrupts
Interrupts
Jamia Hamdard
 
Interrupts of 8085
Interrupts of 8085Interrupts of 8085
Interrupts of 8085
ShivamSood22
 
8085 interrupts
8085 interrupts8085 interrupts
8085 interrupts
deval patel
 
Embedded systems, lesson 16
Embedded systems, lesson 16Embedded systems, lesson 16
Embedded systems, lesson 16
REKHASENCHAgs0801bm1
 
Interrupt 8085
Interrupt 8085Interrupt 8085
Interrupt 8085
Shubham Singh
 
Interrupts
InterruptsInterrupts
Interrupts
deval patel
 
Chapter 4 - Interrupts of 8085
Chapter 4 - Interrupts of 8085Chapter 4 - Interrupts of 8085
Chapter 4 - Interrupts of 8085
Bisrat Girma
 
Interrupt11
Interrupt11Interrupt11
Interrupt11Aisu
 
Interrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kInterrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.k
Vijay Kumar
 
Interrupts programming in embedded C using 8051
Interrupts programming in embedded C using 8051Interrupts programming in embedded C using 8051
Interrupts programming in embedded C using 8051
Vikas Dongre
 
ES-CH6.ppt
ES-CH6.pptES-CH6.ppt
ES-CH6.ppt
alaakaraja1
 
Interruptsof8085
Interruptsof8085Interruptsof8085
Interruptsof8085
sudheerkethamreddy
 

Similar to Interrupts at AVR (20)

Interrupt in ATMEGA328P.pptx
Interrupt in ATMEGA328P.pptxInterrupt in ATMEGA328P.pptx
Interrupt in ATMEGA328P.pptx
 
Unit 3 timer and counter and there application .pptx
Unit 3 timer and counter and there application .pptxUnit 3 timer and counter and there application .pptx
Unit 3 timer and counter and there application .pptx
 
Interrupts
InterruptsInterrupts
Interrupts
 
Micro controller 8051 Interrupts
Micro controller 8051 InterruptsMicro controller 8051 Interrupts
Micro controller 8051 Interrupts
 
Interrupts in 8051
Interrupts in 8051Interrupts in 8051
Interrupts in 8051
 
DPA
DPADPA
DPA
 
Interrupts
InterruptsInterrupts
Interrupts
 
Interrupts
InterruptsInterrupts
Interrupts
 
Interrupts of 8085
Interrupts of 8085Interrupts of 8085
Interrupts of 8085
 
8085 interrupts
8085 interrupts8085 interrupts
8085 interrupts
 
Embedded systems, lesson 16
Embedded systems, lesson 16Embedded systems, lesson 16
Embedded systems, lesson 16
 
Interrupt 8085
Interrupt 8085Interrupt 8085
Interrupt 8085
 
Interrupts
InterruptsInterrupts
Interrupts
 
Chapter 4 - Interrupts of 8085
Chapter 4 - Interrupts of 8085Chapter 4 - Interrupts of 8085
Chapter 4 - Interrupts of 8085
 
Interrupt
InterruptInterrupt
Interrupt
 
Interrupt11
Interrupt11Interrupt11
Interrupt11
 
Interrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kInterrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.k
 
Interrupts programming in embedded C using 8051
Interrupts programming in embedded C using 8051Interrupts programming in embedded C using 8051
Interrupts programming in embedded C using 8051
 
ES-CH6.ppt
ES-CH6.pptES-CH6.ppt
ES-CH6.ppt
 
Interruptsof8085
Interruptsof8085Interruptsof8085
Interruptsof8085
 

Recently uploaded

一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
Kamal Acharya
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
ShahidSultan24
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 

Recently uploaded (20)

一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
 

Interrupts at AVR

  • 1.
  • 2. WHAT ARE INTERRUPTS? Interrupts are: basically events that require immediate attention by the microcontroller. When an interrupt event occurs the microcontroller pause its current task and attend to the interrupt by executing an Interrupt Service Routine (ISR) at the end of the ISR the microcontroller returns to the task it had pause and continue its normal operations. How come? In order for the microcontroller to respond to an interrupt event the interrupt feature of the microcontroller must be enabled along with the specific interrupt. This is done by setting the Global Interrupt Enabled bit and the Interrupt Enable bit of the specific interrupt. 2
  • 3. SOME CONCEPTS ISR: An Interrupt Service Routine or Interrupt Handler is a piece of code that should be execute when an interrupt is triggered. Usually each enabled interrupt has its own ISR. Note That In AVR assembly language each ISR MUST end with the RETI instruction which indicates the end of the ISR. Interrupt Flags and Enabled bits: Each interrupt is associated with two (2) bits, an Interrupt Flag Bit and an Interrupt Enabled Bit. These bits are located in the I/O registers associated with the specific interrupt.  The interrupt flag bit is set whenever the interrupt event occur, Even if not the interrupt is enabled. 3
  • 4. SOME CONCEPTS The interrupt enabled bit is used to enable or disable a specific interrupt. Basically is tells the microcontroller whether or not it should respond to the interrupt if it is triggered.  For the AVR 8-bits microcontroller this bit is located in the Status I/O Register (SREG). The Global Interrupt Enabled is bit 7, the I bit, in the SREG.  interrupt vector : is the memory address of an interrupt handler. 4
  • 5. INTERRUPT TYPES Internal : The internal interrupts are associated with the microcontroller's peripherals EX: That is the Timer/Counter, Analog Comparator External: They are triggered via external pins Pins 6,7,8,9,25,26,27,28 5