SlideShare a Scribd company logo
1 of 3
Download to read offline
8051 interrupts T.Srikrishna, M.Tech , GVP
8051 Interrupts
Interrupts are basically the events that temporarily suspend the main program, pass
the control to the external sources and execute their task. It then passes the control
to the main program where it had left off.
8051 has five interrupts. These interrupts are INT0, INT1, TO, T1, TI/RI.
The interrupt addresses of these interrupts are like below −
Interrupt Address
INT0 0003H
INT1 000BH
T0 0013H
T1 001BH
TI/RI 0023H
Interrupt Enable (IE) Register
This register can be used to enable or disable interrupts programmatically.
This register is an SFR. This is bit addressable.
BitAddress AF AE AD AC AB AA A9 A8
Bit Details EA X X ES ET1 EX1 ET0 EX0
Bit
Details
High Value(1) Low Value(0)
EA Least significant 5 bits can decide
enable or disable of these five
interrupts.
Disable all five interrupts. It just
ignores the rest five bits.
ES Enable Serial Port Interrupt Disable Serial Port Interrupt
ET1 Enable Timer1 interrupt Disable Timer1 interrupt
EX1 Enable external interrupt 1 (INT1) Disable external interrupt 1 (INT1)
ET0 Enable Timer0 interrupt Disable Timer0 interrupt
EX0 Enable external interrupt 0 (INT0) Disable external interrupt 0 (INT0)
8051 interrupts T.Srikrishna, M.Tech , GVP
Interrupt Priority (IP) Register
The priority levels are level 1 and level 0. Priority level 1 indicates the higher priority,
and level 0 indicates lower priority. This IP register can be used to store the priority
levels for each interrupt. This is also a bit addressable SFR.
BitAddress BF BE BD BC BB BA B9 B8
Bit Details X X X PS PT1 PX1 PT0 PX0
Bit
Details
High Value(1) Low Value(0)
PS Set 1 level priority of Serial port
interrupt
Set 0 level priority of Serial port
interrupt
PT1 Set 1 level priority of Timer1 interrupt Set 0 level priority of Timer1 interrupt
PX1 Set 1 level priority of external interrupt
1 (INT1)
Set 0 level priority of external interrupt
1 (INT1)
PT0 Set 1 level priority of Timer0 interrupt Set 0 level priority of Timer0 interrupt
PX0 Set 1 level priority of external interrupt
0 (INT0)
Set 0 level priority of external interrupt
0 (INT0)
When all of the five interrupts are in same priority level, and if all of the interrupts are
enabled, then the sequence of interrupts will be INT0, T0, INT1, T1, TI/R I.
Some specific priority register value can be used to maintain the priorities of the
interrupts.
Example: Let the value of Priority register is xxx00101 indicates the
sequence INT0, INT1, TI/RI, T1, T0.
External Interrupt
The external interrupts of 8051 are INT0and. INT1 .These interrupts can be
programmed to either edge-triggered or level triggered.
The TCON register can be used to program external interrupts to edge or level
triggered.
TCON register
The TCON is Timer Control. TCON is another bit addressable SFR.
BitAddress 8F 8E 8D 8C 8B 8A 89 88
Bit Details TF1 TR1 TF0 TR0 IE1 IT1 IE0 IT0
8051 interrupts T.Srikrishna, M.Tech , GVP
Bit
Details
High Value(1) Low Value(0)
IT0 Set ( INT0) as negative edge triggered
input.
Set ( INT0) as active low level
triggered input.
IT1 Set ( INT1) as negative edge triggered
input.
Set ( INT1) as active low level
triggered input.
IE0 This will be 1, when INT0is activated
as level triggered.
This will be 0, when INT0is activated
as edge triggered.
IE1 This will be 1, when INT1 is activated
as level triggered.
This will be 0, when INT1 is activated
as edge triggered.
TR0 Set Timer0 as run mode Set Timer0 as stop mode.
TR1 Set Timer1 as run mode Set Timer1 as stop mode.
TF0 High when Timer T0 overflow occurs. After resetting the timer T0 thiswill
also be changed to 0 state
TF1 High when Timer T1 overflow occurs. After resetting the timer T1 this will
also be changed to 0 state.
The IT0 and IT1 are stands for Interrupt Type. These bits are used to decide
whether the INT0 and INT1 will be level trigged or edge triggered.
IE0 and IE1 bits are used to indicate the status of external interrupts. These bit can
be set or reset by the microcontroller itself.
The first four bits are the status information about timers. When TR0 and TR1 are 1,
it indicates the running mode of the timers.
The TF0 and TF1 are used to indicate the overflow of timer T0 and T1 respectively.
When over flow occurs these flags are set to 1.
Serial Port Interrupt
The serial ports can be used either Transmitting mode or reception mode.
The interrupt status for the Transmission is provided by TI, and status for Reception
is provided by RI.
SCON Register
These are two bits of SCON(Serial Control). This is also a bit addressable SFR.
BitAddress 9F 9E 9D 9C 9B 9A 99 98
Bit Details SM0 SM1 SM2 REN TB8 RB8 TI RI

More Related Content

What's hot

Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Dhaval Kaneria
 
Interrupts for PIC18
Interrupts for PIC18Interrupts for PIC18
Interrupts for PIC18raosandy11
 
SPI introduction(Serial Peripheral Interface)
SPI introduction(Serial Peripheral Interface)SPI introduction(Serial Peripheral Interface)
SPI introduction(Serial Peripheral Interface)SUNODH GARLAPATI
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Aarav Soni
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051Muthu Manickam
 
8051 architecture
8051 architecture8051 architecture
8051 architecturesb108ec
 
Introduction to pic microcontroller
Introduction to pic microcontrollerIntroduction to pic microcontroller
Introduction to pic microcontrollerSiva Kumar
 
8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controllerabhikalmegh
 
INTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLERINTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLERAnkita Jaiswal
 
Master synchronous serial port (mssp)
Master synchronous serial port (mssp)Master synchronous serial port (mssp)
Master synchronous serial port (mssp)babak danyal
 

What's hot (20)

Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)
 
Interrupts for PIC18
Interrupts for PIC18Interrupts for PIC18
Interrupts for PIC18
 
Adc interfacing
Adc interfacingAdc interfacing
Adc interfacing
 
SPI introduction(Serial Peripheral Interface)
SPI introduction(Serial Peripheral Interface)SPI introduction(Serial Peripheral Interface)
SPI introduction(Serial Peripheral Interface)
 
Interrupts in pic
Interrupts in picInterrupts in pic
Interrupts in pic
 
Unit 5
Unit 5Unit 5
Unit 5
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
 
8051 i/o port circuit
8051 i/o port circuit8051 i/o port circuit
8051 i/o port circuit
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051
 
8051 architecture
8051 architecture8051 architecture
8051 architecture
 
Introduction to pic microcontroller
Introduction to pic microcontrollerIntroduction to pic microcontroller
Introduction to pic microcontroller
 
8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller
 
UART
UART UART
UART
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
Serial Communication in 8051
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
 
INTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLERINTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLER
 
Master synchronous serial port (mssp)
Master synchronous serial port (mssp)Master synchronous serial port (mssp)
Master synchronous serial port (mssp)
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
Interrupts in 8051
Interrupts in 8051Interrupts in 8051
Interrupts in 8051
 
Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051
 

Similar to interrupts of 8051.pdf

Interrupt programming with 8051 microcontroller
Interrupt programming with 8051  microcontrollerInterrupt programming with 8051  microcontroller
Interrupt programming with 8051 microcontrollerAnkit Bhatnagar
 
Microprocessor 8051
Microprocessor 8051Microprocessor 8051
Microprocessor 8051Anil Maurya
 
Interrupt programming
Interrupt programming Interrupt programming
Interrupt programming vijaydeepakg
 
Timer And Counter in 8051 Microcontroller
Timer And Counter in 8051 MicrocontrollerTimer And Counter in 8051 Microcontroller
Timer And Counter in 8051 MicrocontrollerJay Makwana
 
37471656 interrupts
37471656 interrupts37471656 interrupts
37471656 interruptstt_aljobory
 
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1KanchanPatil34
 
Programming 8051 Timers
Programming 8051 Timers Programming 8051 Timers
Programming 8051 Timers ViVek Patel
 
8051 Microcontroller Overview by Venkatrao Ramisetti
8051 Microcontroller Overview by Venkatrao Ramisetti 8051 Microcontroller Overview by Venkatrao Ramisetti
8051 Microcontroller Overview by Venkatrao Ramisetti VenkatraoRamisetti
 
UNIT 5 Interfacing and Mixed Signal Controller.pptx
UNIT 5 Interfacing and Mixed Signal Controller.pptxUNIT 5 Interfacing and Mixed Signal Controller.pptx
UNIT 5 Interfacing and Mixed Signal Controller.pptxGowrishankar C
 

Similar to interrupts of 8051.pdf (20)

Interrupt.pptx
Interrupt.pptxInterrupt.pptx
Interrupt.pptx
 
Interrupt programming with 8051 microcontroller
Interrupt programming with 8051  microcontrollerInterrupt programming with 8051  microcontroller
Interrupt programming with 8051 microcontroller
 
DPA
DPADPA
DPA
 
Microprocessor 8051
Microprocessor 8051Microprocessor 8051
Microprocessor 8051
 
Embedded systems, lesson 16
Embedded systems, lesson 16Embedded systems, lesson 16
Embedded systems, lesson 16
 
8051 Interrupts
8051 Interrupts8051 Interrupts
8051 Interrupts
 
Interrupt in 8051
Interrupt in 8051Interrupt in 8051
Interrupt in 8051
 
Interrupt programming
Interrupt programming Interrupt programming
Interrupt programming
 
8051 Inturrpt
8051 Inturrpt8051 Inturrpt
8051 Inturrpt
 
8051 interrupts
8051 interrupts8051 interrupts
8051 interrupts
 
Timer And Counter in 8051 Microcontroller
Timer And Counter in 8051 MicrocontrollerTimer And Counter in 8051 Microcontroller
Timer And Counter in 8051 Microcontroller
 
37471656 interrupts
37471656 interrupts37471656 interrupts
37471656 interrupts
 
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1
 
Programming 8051 Timers
Programming 8051 Timers Programming 8051 Timers
Programming 8051 Timers
 
8051 Microcontroller Overview by Venkatrao Ramisetti
8051 Microcontroller Overview by Venkatrao Ramisetti 8051 Microcontroller Overview by Venkatrao Ramisetti
8051 Microcontroller Overview by Venkatrao Ramisetti
 
8051 Timers
8051 Timers8051 Timers
8051 Timers
 
Interrupt
InterruptInterrupt
Interrupt
 
Interrupt
InterruptInterrupt
Interrupt
 
UNIT 5 Interfacing and Mixed Signal Controller.pptx
UNIT 5 Interfacing and Mixed Signal Controller.pptxUNIT 5 Interfacing and Mixed Signal Controller.pptx
UNIT 5 Interfacing and Mixed Signal Controller.pptx
 
Timers
TimersTimers
Timers
 

More from Srikrishna Thota

solar energy introduction.pdf
 solar energy introduction.pdf solar energy introduction.pdf
solar energy introduction.pdfSrikrishna Thota
 
8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdfSrikrishna Thota
 
Types of Microcontrollers.pdf
Types of Microcontrollers.pdfTypes of Microcontrollers.pdf
Types of Microcontrollers.pdfSrikrishna Thota
 
Addressing modes of 8051.pdf
Addressing modes of 8051.pdfAddressing modes of 8051.pdf
Addressing modes of 8051.pdfSrikrishna Thota
 
Port Organization of 8051 .pdf
Port Organization of 8051 .pdfPort Organization of 8051 .pdf
Port Organization of 8051 .pdfSrikrishna Thota
 
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdfDEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdfSrikrishna Thota
 
DAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfDAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfSrikrishna Thota
 
Interfacing of 8051 with 8255 Programmable Peripheral Interface.pdf
Interfacing of 8051 with 8255 Programmable Peripheral Interface.pdfInterfacing of 8051 with 8255 Programmable Peripheral Interface.pdf
Interfacing of 8051 with 8255 Programmable Peripheral Interface.pdfSrikrishna Thota
 
Seven segment interfacing with 8051.pdf
Seven segment interfacing with 8051.pdfSeven segment interfacing with 8051.pdf
Seven segment interfacing with 8051.pdfSrikrishna Thota
 
interfacing of temperature sensor LM 35 with 8051.pdf
interfacing of temperature sensor LM 35 with 8051.pdfinterfacing of temperature sensor LM 35 with 8051.pdf
interfacing of temperature sensor LM 35 with 8051.pdfSrikrishna Thota
 
BInary Number Representation
 BInary Number Representation BInary Number Representation
BInary Number RepresentationSrikrishna Thota
 
Number Base Conversion Digital Electronics
Number Base Conversion Digital ElectronicsNumber Base Conversion Digital Electronics
Number Base Conversion Digital ElectronicsSrikrishna Thota
 
Digital Electronics Notes
Digital Electronics Notes Digital Electronics Notes
Digital Electronics Notes Srikrishna Thota
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesSrikrishna Thota
 
Analog to Digital Conversion Basics
Analog to Digital Conversion BasicsAnalog to Digital Conversion Basics
Analog to Digital Conversion BasicsSrikrishna Thota
 
8259 programmable interrupt controller
8259 programmable interrupt controller8259 programmable interrupt controller
8259 programmable interrupt controllerSrikrishna Thota
 
8085 interfacing with memory chips
8085 interfacing with memory chips8085 interfacing with memory chips
8085 interfacing with memory chipsSrikrishna Thota
 

More from Srikrishna Thota (19)

solar energy introduction.pdf
 solar energy introduction.pdf solar energy introduction.pdf
solar energy introduction.pdf
 
8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf
 
Types of Microcontrollers.pdf
Types of Microcontrollers.pdfTypes of Microcontrollers.pdf
Types of Microcontrollers.pdf
 
Addressing modes of 8051.pdf
Addressing modes of 8051.pdfAddressing modes of 8051.pdf
Addressing modes of 8051.pdf
 
Port Organization of 8051 .pdf
Port Organization of 8051 .pdfPort Organization of 8051 .pdf
Port Organization of 8051 .pdf
 
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdfDEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
 
DAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfDAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdf
 
Interfacing of 8051 with 8255 Programmable Peripheral Interface.pdf
Interfacing of 8051 with 8255 Programmable Peripheral Interface.pdfInterfacing of 8051 with 8255 Programmable Peripheral Interface.pdf
Interfacing of 8051 with 8255 Programmable Peripheral Interface.pdf
 
Seven segment interfacing with 8051.pdf
Seven segment interfacing with 8051.pdfSeven segment interfacing with 8051.pdf
Seven segment interfacing with 8051.pdf
 
interfacing of temperature sensor LM 35 with 8051.pdf
interfacing of temperature sensor LM 35 with 8051.pdfinterfacing of temperature sensor LM 35 with 8051.pdf
interfacing of temperature sensor LM 35 with 8051.pdf
 
BInary Number Representation
 BInary Number Representation BInary Number Representation
BInary Number Representation
 
Number Base Conversion Digital Electronics
Number Base Conversion Digital ElectronicsNumber Base Conversion Digital Electronics
Number Base Conversion Digital Electronics
 
Operational amplifiers
Operational amplifiers Operational amplifiers
Operational amplifiers
 
Digital Electronics Notes
Digital Electronics Notes Digital Electronics Notes
Digital Electronics Notes
 
The 8255 PPI
The 8255 PPIThe 8255 PPI
The 8255 PPI
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 Features
 
Analog to Digital Conversion Basics
Analog to Digital Conversion BasicsAnalog to Digital Conversion Basics
Analog to Digital Conversion Basics
 
8259 programmable interrupt controller
8259 programmable interrupt controller8259 programmable interrupt controller
8259 programmable interrupt controller
 
8085 interfacing with memory chips
8085 interfacing with memory chips8085 interfacing with memory chips
8085 interfacing with memory chips
 

Recently uploaded

social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 

Recently uploaded (20)

social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 

interrupts of 8051.pdf

  • 1. 8051 interrupts T.Srikrishna, M.Tech , GVP 8051 Interrupts Interrupts are basically the events that temporarily suspend the main program, pass the control to the external sources and execute their task. It then passes the control to the main program where it had left off. 8051 has five interrupts. These interrupts are INT0, INT1, TO, T1, TI/RI. The interrupt addresses of these interrupts are like below − Interrupt Address INT0 0003H INT1 000BH T0 0013H T1 001BH TI/RI 0023H Interrupt Enable (IE) Register This register can be used to enable or disable interrupts programmatically. This register is an SFR. This is bit addressable. BitAddress AF AE AD AC AB AA A9 A8 Bit Details EA X X ES ET1 EX1 ET0 EX0 Bit Details High Value(1) Low Value(0) EA Least significant 5 bits can decide enable or disable of these five interrupts. Disable all five interrupts. It just ignores the rest five bits. ES Enable Serial Port Interrupt Disable Serial Port Interrupt ET1 Enable Timer1 interrupt Disable Timer1 interrupt EX1 Enable external interrupt 1 (INT1) Disable external interrupt 1 (INT1) ET0 Enable Timer0 interrupt Disable Timer0 interrupt EX0 Enable external interrupt 0 (INT0) Disable external interrupt 0 (INT0)
  • 2. 8051 interrupts T.Srikrishna, M.Tech , GVP Interrupt Priority (IP) Register The priority levels are level 1 and level 0. Priority level 1 indicates the higher priority, and level 0 indicates lower priority. This IP register can be used to store the priority levels for each interrupt. This is also a bit addressable SFR. BitAddress BF BE BD BC BB BA B9 B8 Bit Details X X X PS PT1 PX1 PT0 PX0 Bit Details High Value(1) Low Value(0) PS Set 1 level priority of Serial port interrupt Set 0 level priority of Serial port interrupt PT1 Set 1 level priority of Timer1 interrupt Set 0 level priority of Timer1 interrupt PX1 Set 1 level priority of external interrupt 1 (INT1) Set 0 level priority of external interrupt 1 (INT1) PT0 Set 1 level priority of Timer0 interrupt Set 0 level priority of Timer0 interrupt PX0 Set 1 level priority of external interrupt 0 (INT0) Set 0 level priority of external interrupt 0 (INT0) When all of the five interrupts are in same priority level, and if all of the interrupts are enabled, then the sequence of interrupts will be INT0, T0, INT1, T1, TI/R I. Some specific priority register value can be used to maintain the priorities of the interrupts. Example: Let the value of Priority register is xxx00101 indicates the sequence INT0, INT1, TI/RI, T1, T0. External Interrupt The external interrupts of 8051 are INT0and. INT1 .These interrupts can be programmed to either edge-triggered or level triggered. The TCON register can be used to program external interrupts to edge or level triggered. TCON register The TCON is Timer Control. TCON is another bit addressable SFR. BitAddress 8F 8E 8D 8C 8B 8A 89 88 Bit Details TF1 TR1 TF0 TR0 IE1 IT1 IE0 IT0
  • 3. 8051 interrupts T.Srikrishna, M.Tech , GVP Bit Details High Value(1) Low Value(0) IT0 Set ( INT0) as negative edge triggered input. Set ( INT0) as active low level triggered input. IT1 Set ( INT1) as negative edge triggered input. Set ( INT1) as active low level triggered input. IE0 This will be 1, when INT0is activated as level triggered. This will be 0, when INT0is activated as edge triggered. IE1 This will be 1, when INT1 is activated as level triggered. This will be 0, when INT1 is activated as edge triggered. TR0 Set Timer0 as run mode Set Timer0 as stop mode. TR1 Set Timer1 as run mode Set Timer1 as stop mode. TF0 High when Timer T0 overflow occurs. After resetting the timer T0 thiswill also be changed to 0 state TF1 High when Timer T1 overflow occurs. After resetting the timer T1 this will also be changed to 0 state. The IT0 and IT1 are stands for Interrupt Type. These bits are used to decide whether the INT0 and INT1 will be level trigged or edge triggered. IE0 and IE1 bits are used to indicate the status of external interrupts. These bit can be set or reset by the microcontroller itself. The first four bits are the status information about timers. When TR0 and TR1 are 1, it indicates the running mode of the timers. The TF0 and TF1 are used to indicate the overflow of timer T0 and T1 respectively. When over flow occurs these flags are set to 1. Serial Port Interrupt The serial ports can be used either Transmitting mode or reception mode. The interrupt status for the Transmission is provided by TI, and status for Reception is provided by RI. SCON Register These are two bits of SCON(Serial Control). This is also a bit addressable SFR. BitAddress 9F 9E 9D 9C 9B 9A 99 98 Bit Details SM0 SM1 SM2 REN TB8 RB8 TI RI