SlideShare a Scribd company logo
1
Prepared By,
Ms. K. D. Patil, Assistant Professor
Department of Information Technology
(NBA accredited)
Sanjivani College of Engineering, Kopargaon-423603.
Maharashtra, India.
(An Autonomous Institute, Affiliated with SPPU, Pune.)
NAAC ‘A’ Grade Accredited, ISO 9001:2015 certified
 Student will be able to
 Introduce Interrupts of 8051 microcontroller
 Learn Special Function Registers and their
configurations
 Apply knowledge of 8051 assembly language to
write a code for 8051 Interrupt
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 2
 Part 1
 What is Interrupt?
 Different Ways 8051 Handles Interrupt
 Interrupt Service Routine
 Types of Interrupts
 InterruptVectorTable
 Part 2
 Special Function Registers
▪ IE
▪ IP
 Interrupt Structure
 Example of Interrupt Programming
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 3
 An interrupt is an external or internal event
that interrupts the microcontroller to inform
it that a device needs its service
 A single microcontroller can serve several
devices by two ways
 Interrupts
 Polling
Prepared By: Ms. K. D. Patil, Dept. of Information Technology,Sanjivani COE, Kopargaon 4
 Interrupts
 Whenever any device needs service of
microcontroller, the device notifies the
microcontroller by sending it an interrupt signal
 Upon receiving an interrupt signal, the
microcontroller interrupts whatever it is doing
and serves the device
 The program which is associated with the
interrupt is called the interrupt service routine
(ISR) or interrupt handler
Prepared By: Ms. K. D. Patil, Dept. of Information Technology,Sanjivani COE, Kopargaon 5
 Advantages of Interrupts method
 Microcontroller can serve many devices (at a
time one)
 Each devices can get the attention of the
microcontroller based on the assigned priority
 The microcontroller can also ignore (mask) a
device request for service
Prepared By: Ms. K. D. Patil, Dept. of Information Technology,Sanjivani COE, Kopargaon 6
 Polling
 Another method of Interrupt handling in 8051 is Polling
 The microcontroller continuously monitors the status of a given device
 When the conditions met, it performs the service
 After that, microcontroller moves on to monitor the next device until
every one is serviced
 Polling can monitor the status of several devices and serve each of
them as certain conditions are met
 Disadvantages
 The polling method is not efficient, since it wastes much of the
microcontroller’s time by polling devices that do not need service
 It checks all the devices in Round Robin fashion and does not change
priority
 example. JNB TF, target
Prepared By: Ms. K. D. Patil, Dept. of Information Technology,Sanjivani COE, Kopargaon 7
 For every interrupt, there must be an Interrupt
Service Routine (ISR), or Interrupt Handler
 ISR is a small program or subroutine that 8051
executes to handle the interrupt
 When an interrupt is invoked, microcontroller runs
the ISR
 For every interrupt, there is a fixed location in
memory that holds the address of its ISR
 The group of memory locations set aside to hold
the addresses of ISRs is called interrupt vector
table
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 8
 When microcontroller sense some Interrupt it
goes through the following steps to handle that
interrupt
 Step 1: Microcontroller finishes the instruction it
is executing and saves the address of the next
instruction (PC) on the stack
 Step 2: It saves the current status of all the
interrupts internally (not on the stack)
 Step 3: It jumps to a fixed location in memory,
called the interrupt vector table (IVT), that holds
the address of the ISR
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 9
 Step 4 : The microcontroller gets the address of the
ISR from the interrupt vector table and jumps to it
 It starts to execute the ISR until it reaches the last
instruction of the subroutine which is RETI (return
from interrupt)
 Step 5: Upon executing the RETI instruction, the
microcontroller returns to the place where it was
interrupted
 First, it gets the program counter (PC) address from
the stack by popping the top two bytes of the stack
into the PC
 Then it starts to execute from that address
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 10
 There are a total of 6 interrupts available in
8051
1. Reset
2.Timer 0 Interrupt (TF0)
3.Timer 1 Interrupt (TF1)
4. External Hardware Interrupt 0 (INT0)
5. External Hardware Interrupt 1 (INT1)
6. Serial com Interrupt (RI andTI)
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 11
 This is power up reset
 When the reset pin is activated, 8051 jumps to
the address 0000H
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 12
 Two interrupts are set aside for the timers:
 one for timer 0 and
 another for timer 1
 Memory locations 000BH and 001BH in the
InterruptVectorTable belongs toTimer 0 and
Timer 1 respectively
 In polling, we have to monitorTF (Timer Overflow
Flag) with the instruction
“JNBTF,Target”
 We have to wait untilTF is raised, and
microcontroller cannot do anything else
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 13
1 000B H
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 14
TF0
Jumps to
Timer 0 InterruptVector
1 001B H
TF1
Jumps to
Timer 1 InterruptVector
 If theTimer Interrupt in IE (Interrupt Enable) is
enabled, whenever the timer rolls over,TF
raised and the microcontroller is interrupted
in whatever it is doing, and jumps to IVT to
service the ISR
 In this way microcontroller can do other
things until it is notified that timer is rolled
over
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 15
 The 8051 has two external hardware interrupts
 Pin 12 (P3.2) and pin 13 (P3.3) of the 8051, designated
as INTO and INT1, are used as external hardware
interrupts.
 These interrupts are referred as EX0 and EX1
respectively
 Upon activation of these pins, the 8051 gets
interrupted in whatever it is doing and jumps to the
vector table to perform the interrupt service routine
 Memory Locations 0003H and 0013H in the IVT are
assigned to INT0 and INT1 respectively
 These interrupts are enabled or disabled using IE
register
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 16
 Activation of INT0 and INT1 interrupts
 There are two ways of activation of External
Hardware Interrupt
▪ LevelTriggered
▪ EdgeTriggered
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 17
 Level Triggered interrupts
 INTO and INT1 pins are normally high (just like all I/O port
pins)
 Interrupt 1 type control bit (TCON.0) / Interrupt 1 type control
bit (TCON.2)ofTCON register goes high after 8051 sense such
type of interrupt
 if a low-level signal is applied to them, it triggers the interrupt.
 Then the microcontroller stops whatever it is doing and jumps
to the interrupt vector table to service that interrupt.
 This is called a level-triggered or level-activated
interrupt and is the default mode upon reset of the 8051.
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 18
 if the low-level interrupt signal is not removed before the ISR
is finished it is interpreted as another interrupt and the 8051
jumps to the vector table to execute the ISR again.
 EdgeTriggered interrupts
 Upon reset the 8051 makes INTO and INT1 low-level triggered
interrupts.
 To make them edge-triggered interrupts, we must program
the IE0 (TCON.1) External Interrupt 0 Flag and IE1 (TCON.3)
External Interrupt 1 Flag bits of theTCON register.
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 19
 Serial communication has a single interrupt that
belongs to both receive and transfer
 The interruptVectorTable Location 0023H belongs to
this interrupt
 Used to both send and receive data
 If the interrupt bit in IE is enabled, when RI andTI is
raised, 8051 gets interrupted and jumps to memory
location 0023H to execute ISR
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 20
 TI (Transfer Interrupt) is raised when the last
bit of the framed data, stop bit is transferred
indicating that the SBUF register is ready to
transfer next byte
 RI (Receive Interrupt) is raised when the
received byte needs to be picked up before it
is lost by new incoming serial data
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 21
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 22
Interrupts ROM
Location
(HEX)
Pin Flag
Clearing
Reset 0000 9 Auto
External Hardware Interrupt 0
(INT0)
0003 P3.2 (12) Auto
Timer 0 Interrupt (TF0) 000B Auto
External Hardware Interrupt 1
(INT1)
0013 P3.3 (13) Auto
Timer 1 Interrupt (TF1) 001B Auto
Serial com Interrupt (RI and
TI)
0023 Programmer
Clears it
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 23
Interrupts Flag SFR Register
Bit
External Hardware Interrupt 0 IE0 TCON.1
Timer 0 Interrupt TF0 TCON.5
External Hardware Interrupt 1 IE1 TCON.3
Timer 1 Interrupt TF1 TCON.7
Serial com Interrupt TI SCON.1
Timer 2 Interrupt TF2 T2CON.7
(AT89C52)
Timer 2 Interrupt EXF2 T2CON.6
(AT89C52)
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 24
 “The 8051 Microcontroller and Embedded
Systems usingAssembly and C” , Muhammad
Ali Mazidi, Janice Gillispie Mazidi, Rolin D.
McKinlay, Second Edition, Pearson
publication
 http://what-when-how.com/8051-
microcontroller/programming-external-
hardware-interrupts/
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 25
Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE,
Kopargaon 26

More Related Content

What's hot

Interrupt of 8085
Interrupt of 8085Interrupt of 8085
Interrupt of 8085Nitin Ahire
 
Micro controller 8051 Interrupts
Micro controller 8051 InterruptsMicro controller 8051 Interrupts
Micro controller 8051 Interruptsdharmesh nakum
 
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2KanchanPatil34
 
Interrupt programming with 8051 microcontroller
Interrupt programming with 8051  microcontrollerInterrupt programming with 8051  microcontroller
Interrupt programming with 8051 microcontrollerAnkit Bhatnagar
 
Interrupts of 8085
Interrupts of 8085Interrupts of 8085
Interrupts of 8085ShivamSood22
 
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1KanchanPatil34
 
Fpga implementation of power efficient all digital phase locked loop
Fpga implementation of power efficient all digital phase locked loopFpga implementation of power efficient all digital phase locked loop
Fpga implementation of power efficient all digital phase locked loopIAEME Publication
 
B tech Final Year Projects & Embedded Systems Training
B tech Final Year Projects & Embedded Systems Training B tech Final Year Projects & Embedded Systems Training
B tech Final Year Projects & Embedded Systems Training Technogroovy India
 
Microcontroller (8051) by K. Vijay Kumar
Microcontroller (8051) by K. Vijay KumarMicrocontroller (8051) by K. Vijay Kumar
Microcontroller (8051) by K. Vijay KumarVijay Kumar
 
8085 interrupts
8085 interrupts8085 interrupts
8085 interruptsRam Babu
 
Chapter 4 - Interrupts of 8085
Chapter 4 - Interrupts of 8085Chapter 4 - Interrupts of 8085
Chapter 4 - Interrupts of 8085Bisrat Girma
 
Mastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWER
Mastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWERMastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWER
Mastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWERFastBit Embedded Brain Academy
 

What's hot (19)

8051 interrupts
8051 interrupts8051 interrupts
8051 interrupts
 
Interrupt
InterruptInterrupt
Interrupt
 
Interrupt of 8085
Interrupt of 8085Interrupt of 8085
Interrupt of 8085
 
Interrupt 8085
Interrupt 8085Interrupt 8085
Interrupt 8085
 
Micro controller 8051 Interrupts
Micro controller 8051 InterruptsMicro controller 8051 Interrupts
Micro controller 8051 Interrupts
 
Interrupt
InterruptInterrupt
Interrupt
 
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2
 
Interrupts in 8085
Interrupts in 8085Interrupts in 8085
Interrupts in 8085
 
Interrupt programming with 8051 microcontroller
Interrupt programming with 8051  microcontrollerInterrupt programming with 8051  microcontroller
Interrupt programming with 8051 microcontroller
 
Interrupts of 8085
Interrupts of 8085Interrupts of 8085
Interrupts of 8085
 
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1
 
Fpga implementation of power efficient all digital phase locked loop
Fpga implementation of power efficient all digital phase locked loopFpga implementation of power efficient all digital phase locked loop
Fpga implementation of power efficient all digital phase locked loop
 
B tech Final Year Projects & Embedded Systems Training
B tech Final Year Projects & Embedded Systems Training B tech Final Year Projects & Embedded Systems Training
B tech Final Year Projects & Embedded Systems Training
 
Microcontroller (8051) by K. Vijay Kumar
Microcontroller (8051) by K. Vijay KumarMicrocontroller (8051) by K. Vijay Kumar
Microcontroller (8051) by K. Vijay Kumar
 
8085 interrupts
8085 interrupts8085 interrupts
8085 interrupts
 
Interrupts
InterruptsInterrupts
Interrupts
 
Chapter 4 - Interrupts of 8085
Chapter 4 - Interrupts of 8085Chapter 4 - Interrupts of 8085
Chapter 4 - Interrupts of 8085
 
Mastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWER
Mastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWERMastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWER
Mastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWER
 
Interrupts
InterruptsInterrupts
Interrupts
 

Similar to Unit 5_interrupt programming_Part 1

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.kVijay Kumar
 
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
 
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 8051Vikas Dongre
 
Interrupt programming
Interrupt programming Interrupt programming
Interrupt programming vijaydeepakg
 
Types of Interrupts with details Mi ppt
Types of Interrupts with details Mi pptTypes of Interrupts with details Mi ppt
Types of Interrupts with details Mi pptsanjaytron
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxRAJEEVKUMARYADAV11
 
Interrupt in ATMEGA328P.pptx
Interrupt in ATMEGA328P.pptxInterrupt in ATMEGA328P.pptx
Interrupt in ATMEGA328P.pptxSujalKumar73
 
unit 3 a.pptxppppppppppppppppppppppppppp
unit 3 a.pptxpppppppppppppppppppppppppppunit 3 a.pptxppppppppppppppppppppppppppp
unit 3 a.pptxpppppppppppppppppppppppppppsachin397946
 
Timing n interrupt.pptx
Timing n interrupt.pptxTiming n interrupt.pptx
Timing n interrupt.pptxJasaRChoudhary
 
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 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 .pptxnaveen088888
 
Interrupts for PIC18
Interrupts for PIC18Interrupts for PIC18
Interrupts for PIC18raosandy11
 
420214730-15cs34-module-2-pptx.pptx
420214730-15cs34-module-2-pptx.pptx420214730-15cs34-module-2-pptx.pptx
420214730-15cs34-module-2-pptx.pptxddscraft123
 

Similar to Unit 5_interrupt programming_Part 1 (20)

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
 
Mc module5 ppt_msj
Mc module5 ppt_msjMc module5 ppt_msj
Mc module5 ppt_msj
 
Embedded systems, lesson 16
Embedded systems, lesson 16Embedded systems, lesson 16
Embedded systems, lesson 16
 
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
 
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
 
Interrupt programming
Interrupt programming Interrupt programming
Interrupt programming
 
Types of Interrupts with details Mi ppt
Types of Interrupts with details Mi pptTypes of Interrupts with details Mi ppt
Types of Interrupts with details Mi ppt
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
 
Interrupt in ATMEGA328P.pptx
Interrupt in ATMEGA328P.pptxInterrupt in ATMEGA328P.pptx
Interrupt in ATMEGA328P.pptx
 
Interrupts of microcontroller 8051
Interrupts of microcontroller 8051Interrupts of microcontroller 8051
Interrupts of microcontroller 8051
 
Interrupt
InterruptInterrupt
Interrupt
 
Interrupt.pptx
Interrupt.pptxInterrupt.pptx
Interrupt.pptx
 
unit 3 a.pptxppppppppppppppppppppppppppp
unit 3 a.pptxpppppppppppppppppppppppppppunit 3 a.pptxppppppppppppppppppppppppppp
unit 3 a.pptxppppppppppppppppppppppppppp
 
Interrupts
InterruptsInterrupts
Interrupts
 
Timing n interrupt.pptx
Timing n interrupt.pptxTiming n interrupt.pptx
Timing n interrupt.pptx
 
8051 Microcontroller Overview by Venkatrao Ramisetti
8051 Microcontroller Overview by Venkatrao Ramisetti 8051 Microcontroller Overview by Venkatrao Ramisetti
8051 Microcontroller Overview by Venkatrao Ramisetti
 
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 for PIC18
Interrupts for PIC18Interrupts for PIC18
Interrupts for PIC18
 
420214730-15cs34-module-2-pptx.pptx
420214730-15cs34-module-2-pptx.pptx420214730-15cs34-module-2-pptx.pptx
420214730-15cs34-module-2-pptx.pptx
 
Lecture 38
Lecture 38Lecture 38
Lecture 38
 

More from KanchanPatil34

Unit 2_2 Binary Tree as ADT_General Tree.pdf
Unit 2_2 Binary Tree as ADT_General Tree.pdfUnit 2_2 Binary Tree as ADT_General Tree.pdf
Unit 2_2 Binary Tree as ADT_General Tree.pdfKanchanPatil34
 
Unit 2_3 Binary Tree Traversals.pdf
Unit 2_3 Binary Tree Traversals.pdfUnit 2_3 Binary Tree Traversals.pdf
Unit 2_3 Binary Tree Traversals.pdfKanchanPatil34
 
Unit 1_SLL and DLL.pdf
Unit 1_SLL and DLL.pdfUnit 1_SLL and DLL.pdf
Unit 1_SLL and DLL.pdfKanchanPatil34
 
Unit 1_Stack and Queue using Linked Organization.pdf
Unit 1_Stack and Queue using Linked Organization.pdfUnit 1_Stack and Queue using Linked Organization.pdf
Unit 1_Stack and Queue using Linked Organization.pdfKanchanPatil34
 
PAI Unit 3 Paging in 80386 Microporcessor
PAI Unit 3 Paging in 80386 MicroporcessorPAI Unit 3 Paging in 80386 Microporcessor
PAI Unit 3 Paging in 80386 MicroporcessorKanchanPatil34
 
PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386KanchanPatil34
 
PAI Unit 2 Segmentation in 80386 microprocessor
PAI Unit 2 Segmentation in 80386 microprocessorPAI Unit 2 Segmentation in 80386 microprocessor
PAI Unit 2 Segmentation in 80386 microprocessorKanchanPatil34
 
PAI Unit 2 Protection in 80386 segmentation
PAI Unit 2 Protection in 80386 segmentationPAI Unit 2 Protection in 80386 segmentation
PAI Unit 2 Protection in 80386 segmentationKanchanPatil34
 
SE PAI Unit 2_Data Structures in 80386 segmentation
SE PAI Unit 2_Data Structures in 80386 segmentationSE PAI Unit 2_Data Structures in 80386 segmentation
SE PAI Unit 2_Data Structures in 80386 segmentationKanchanPatil34
 
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2KanchanPatil34
 
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3KanchanPatil34
 
SE PAI Unit 5_IO programming in 8051
SE PAI Unit 5_IO programming in 8051SE PAI Unit 5_IO programming in 8051
SE PAI Unit 5_IO programming in 8051KanchanPatil34
 
Unit 3 se pai_ivt and idt
Unit 3 se pai_ivt and idtUnit 3 se pai_ivt and idt
Unit 3 se pai_ivt and idtKanchanPatil34
 
Unit 2 se pai_registers in 80386
Unit 2 se pai_registers in 80386Unit 2 se pai_registers in 80386
Unit 2 se pai_registers in 80386KanchanPatil34
 
Unit i se pai_dos function calls
Unit i se pai_dos function callsUnit i se pai_dos function calls
Unit i se pai_dos function callsKanchanPatil34
 
DELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counterDELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counterKanchanPatil34
 
DELD Unit IV operation modes of shift register
DELD Unit IV operation modes of shift registerDELD Unit IV operation modes of shift register
DELD Unit IV operation modes of shift registerKanchanPatil34
 

More from KanchanPatil34 (20)

Unit 2_2 Binary Tree as ADT_General Tree.pdf
Unit 2_2 Binary Tree as ADT_General Tree.pdfUnit 2_2 Binary Tree as ADT_General Tree.pdf
Unit 2_2 Binary Tree as ADT_General Tree.pdf
 
Unit 2_1 Tree.pdf
Unit 2_1 Tree.pdfUnit 2_1 Tree.pdf
Unit 2_1 Tree.pdf
 
Unit 2_3 Binary Tree Traversals.pdf
Unit 2_3 Binary Tree Traversals.pdfUnit 2_3 Binary Tree Traversals.pdf
Unit 2_3 Binary Tree Traversals.pdf
 
Unit 1_SLL and DLL.pdf
Unit 1_SLL and DLL.pdfUnit 1_SLL and DLL.pdf
Unit 1_SLL and DLL.pdf
 
Unit 1_Stack and Queue using Linked Organization.pdf
Unit 1_Stack and Queue using Linked Organization.pdfUnit 1_Stack and Queue using Linked Organization.pdf
Unit 1_Stack and Queue using Linked Organization.pdf
 
PAI Unit 3 Paging in 80386 Microporcessor
PAI Unit 3 Paging in 80386 MicroporcessorPAI Unit 3 Paging in 80386 Microporcessor
PAI Unit 3 Paging in 80386 Microporcessor
 
PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386
 
PAI Unit 2 Segmentation in 80386 microprocessor
PAI Unit 2 Segmentation in 80386 microprocessorPAI Unit 2 Segmentation in 80386 microprocessor
PAI Unit 2 Segmentation in 80386 microprocessor
 
PAI Unit 2 Protection in 80386 segmentation
PAI Unit 2 Protection in 80386 segmentationPAI Unit 2 Protection in 80386 segmentation
PAI Unit 2 Protection in 80386 segmentation
 
SE PAI Unit 2_Data Structures in 80386 segmentation
SE PAI Unit 2_Data Structures in 80386 segmentationSE PAI Unit 2_Data Structures in 80386 segmentation
SE PAI Unit 2_Data Structures in 80386 segmentation
 
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
 
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3
 
SE PAI Unit 5_IO programming in 8051
SE PAI Unit 5_IO programming in 8051SE PAI Unit 5_IO programming in 8051
SE PAI Unit 5_IO programming in 8051
 
8051 interfacing
8051 interfacing8051 interfacing
8051 interfacing
 
Unit 3 se pai_ivt and idt
Unit 3 se pai_ivt and idtUnit 3 se pai_ivt and idt
Unit 3 se pai_ivt and idt
 
Unit 2 se pai_registers in 80386
Unit 2 se pai_registers in 80386Unit 2 se pai_registers in 80386
Unit 2 se pai_registers in 80386
 
Unit i se pai_dos function calls
Unit i se pai_dos function callsUnit i se pai_dos function calls
Unit i se pai_dos function calls
 
DELD Unit V cpld_fpga
DELD Unit V cpld_fpgaDELD Unit V cpld_fpga
DELD Unit V cpld_fpga
 
DELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counterDELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counter
 
DELD Unit IV operation modes of shift register
DELD Unit IV operation modes of shift registerDELD Unit IV operation modes of shift register
DELD Unit IV operation modes of shift register
 

Recently uploaded

Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdfKamal Acharya
 
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWINGBRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWINGKOUSTAV SARKAR
 
Toll tax management system project report..pdf
Toll tax management system project report..pdfToll tax management system project report..pdf
Toll tax management system project report..pdfKamal Acharya
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdfKamal Acharya
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Aryaabh.arya
 
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxCloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxMd. Shahidul Islam Prodhan
 
Arduino based vehicle speed tracker project
Arduino based vehicle speed tracker projectArduino based vehicle speed tracker project
Arduino based vehicle speed tracker projectRased Khan
 
İTÜ CAD and Reverse Engineering Workshop
İTÜ CAD and Reverse Engineering WorkshopİTÜ CAD and Reverse Engineering Workshop
İTÜ CAD and Reverse Engineering WorkshopEmre Günaydın
 
Peek implant persentation - Copy (1).pdf
Peek implant persentation - Copy (1).pdfPeek implant persentation - Copy (1).pdf
Peek implant persentation - Copy (1).pdfAyahmorsy
 
Furniture showroom management system project.pdf
Furniture showroom management system project.pdfFurniture showroom management system project.pdf
Furniture showroom management system project.pdfKamal Acharya
 
A case study of cinema management system project report..pdf
A case study of cinema management system project report..pdfA case study of cinema management system project report..pdf
A case study of cinema management system project report..pdfKamal Acharya
 
Natalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in KrakówNatalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in Krakówbim.edu.pl
 
fundamentals of drawing and isometric and orthographic projection
fundamentals of drawing and isometric and orthographic projectionfundamentals of drawing and isometric and orthographic projection
fundamentals of drawing and isometric and orthographic projectionjeevanprasad8
 
Digital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdfDigital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdfAbrahamGadissa
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.PrashantGoswami42
 
The Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docx
The Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docxThe Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docx
The Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docxCenterEnamel
 
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industriesMuhammadTufail242431
 
Scaling in conventional MOSFET for constant electric field and constant voltage
Scaling in conventional MOSFET for constant electric field and constant voltageScaling in conventional MOSFET for constant electric field and constant voltage
Scaling in conventional MOSFET for constant electric field and constant voltageRCC Institute of Information Technology
 

Recently uploaded (20)

Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
 
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWINGBRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
 
Toll tax management system project report..pdf
Toll tax management system project report..pdfToll tax management system project report..pdf
Toll tax management system project report..pdf
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdf
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxCloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
 
Arduino based vehicle speed tracker project
Arduino based vehicle speed tracker projectArduino based vehicle speed tracker project
Arduino based vehicle speed tracker project
 
İTÜ CAD and Reverse Engineering Workshop
İTÜ CAD and Reverse Engineering WorkshopİTÜ CAD and Reverse Engineering Workshop
İTÜ CAD and Reverse Engineering Workshop
 
Peek implant persentation - Copy (1).pdf
Peek implant persentation - Copy (1).pdfPeek implant persentation - Copy (1).pdf
Peek implant persentation - Copy (1).pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Furniture showroom management system project.pdf
Furniture showroom management system project.pdfFurniture showroom management system project.pdf
Furniture showroom management system project.pdf
 
A case study of cinema management system project report..pdf
A case study of cinema management system project report..pdfA case study of cinema management system project report..pdf
A case study of cinema management system project report..pdf
 
Natalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in KrakówNatalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in Kraków
 
fundamentals of drawing and isometric and orthographic projection
fundamentals of drawing and isometric and orthographic projectionfundamentals of drawing and isometric and orthographic projection
fundamentals of drawing and isometric and orthographic projection
 
Digital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdfDigital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdf
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
The Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docx
The Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docxThe Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docx
The Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docx
 
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
Scaling in conventional MOSFET for constant electric field and constant voltage
Scaling in conventional MOSFET for constant electric field and constant voltageScaling in conventional MOSFET for constant electric field and constant voltage
Scaling in conventional MOSFET for constant electric field and constant voltage
 

Unit 5_interrupt programming_Part 1

  • 1. 1 Prepared By, Ms. K. D. Patil, Assistant Professor Department of Information Technology (NBA accredited) Sanjivani College of Engineering, Kopargaon-423603. Maharashtra, India. (An Autonomous Institute, Affiliated with SPPU, Pune.) NAAC ‘A’ Grade Accredited, ISO 9001:2015 certified
  • 2.  Student will be able to  Introduce Interrupts of 8051 microcontroller  Learn Special Function Registers and their configurations  Apply knowledge of 8051 assembly language to write a code for 8051 Interrupt Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 2
  • 3.  Part 1  What is Interrupt?  Different Ways 8051 Handles Interrupt  Interrupt Service Routine  Types of Interrupts  InterruptVectorTable  Part 2  Special Function Registers ▪ IE ▪ IP  Interrupt Structure  Example of Interrupt Programming Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 3
  • 4.  An interrupt is an external or internal event that interrupts the microcontroller to inform it that a device needs its service  A single microcontroller can serve several devices by two ways  Interrupts  Polling Prepared By: Ms. K. D. Patil, Dept. of Information Technology,Sanjivani COE, Kopargaon 4
  • 5.  Interrupts  Whenever any device needs service of microcontroller, the device notifies the microcontroller by sending it an interrupt signal  Upon receiving an interrupt signal, the microcontroller interrupts whatever it is doing and serves the device  The program which is associated with the interrupt is called the interrupt service routine (ISR) or interrupt handler Prepared By: Ms. K. D. Patil, Dept. of Information Technology,Sanjivani COE, Kopargaon 5
  • 6.  Advantages of Interrupts method  Microcontroller can serve many devices (at a time one)  Each devices can get the attention of the microcontroller based on the assigned priority  The microcontroller can also ignore (mask) a device request for service Prepared By: Ms. K. D. Patil, Dept. of Information Technology,Sanjivani COE, Kopargaon 6
  • 7.  Polling  Another method of Interrupt handling in 8051 is Polling  The microcontroller continuously monitors the status of a given device  When the conditions met, it performs the service  After that, microcontroller moves on to monitor the next device until every one is serviced  Polling can monitor the status of several devices and serve each of them as certain conditions are met  Disadvantages  The polling method is not efficient, since it wastes much of the microcontroller’s time by polling devices that do not need service  It checks all the devices in Round Robin fashion and does not change priority  example. JNB TF, target Prepared By: Ms. K. D. Patil, Dept. of Information Technology,Sanjivani COE, Kopargaon 7
  • 8.  For every interrupt, there must be an Interrupt Service Routine (ISR), or Interrupt Handler  ISR is a small program or subroutine that 8051 executes to handle the interrupt  When an interrupt is invoked, microcontroller runs the ISR  For every interrupt, there is a fixed location in memory that holds the address of its ISR  The group of memory locations set aside to hold the addresses of ISRs is called interrupt vector table Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 8
  • 9.  When microcontroller sense some Interrupt it goes through the following steps to handle that interrupt  Step 1: Microcontroller finishes the instruction it is executing and saves the address of the next instruction (PC) on the stack  Step 2: It saves the current status of all the interrupts internally (not on the stack)  Step 3: It jumps to a fixed location in memory, called the interrupt vector table (IVT), that holds the address of the ISR Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 9
  • 10.  Step 4 : The microcontroller gets the address of the ISR from the interrupt vector table and jumps to it  It starts to execute the ISR until it reaches the last instruction of the subroutine which is RETI (return from interrupt)  Step 5: Upon executing the RETI instruction, the microcontroller returns to the place where it was interrupted  First, it gets the program counter (PC) address from the stack by popping the top two bytes of the stack into the PC  Then it starts to execute from that address Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 10
  • 11.  There are a total of 6 interrupts available in 8051 1. Reset 2.Timer 0 Interrupt (TF0) 3.Timer 1 Interrupt (TF1) 4. External Hardware Interrupt 0 (INT0) 5. External Hardware Interrupt 1 (INT1) 6. Serial com Interrupt (RI andTI) Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 11
  • 12.  This is power up reset  When the reset pin is activated, 8051 jumps to the address 0000H Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 12
  • 13.  Two interrupts are set aside for the timers:  one for timer 0 and  another for timer 1  Memory locations 000BH and 001BH in the InterruptVectorTable belongs toTimer 0 and Timer 1 respectively  In polling, we have to monitorTF (Timer Overflow Flag) with the instruction “JNBTF,Target”  We have to wait untilTF is raised, and microcontroller cannot do anything else Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 13
  • 14. 1 000B H Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 14 TF0 Jumps to Timer 0 InterruptVector 1 001B H TF1 Jumps to Timer 1 InterruptVector
  • 15.  If theTimer Interrupt in IE (Interrupt Enable) is enabled, whenever the timer rolls over,TF raised and the microcontroller is interrupted in whatever it is doing, and jumps to IVT to service the ISR  In this way microcontroller can do other things until it is notified that timer is rolled over Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 15
  • 16.  The 8051 has two external hardware interrupts  Pin 12 (P3.2) and pin 13 (P3.3) of the 8051, designated as INTO and INT1, are used as external hardware interrupts.  These interrupts are referred as EX0 and EX1 respectively  Upon activation of these pins, the 8051 gets interrupted in whatever it is doing and jumps to the vector table to perform the interrupt service routine  Memory Locations 0003H and 0013H in the IVT are assigned to INT0 and INT1 respectively  These interrupts are enabled or disabled using IE register Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 16
  • 17.  Activation of INT0 and INT1 interrupts  There are two ways of activation of External Hardware Interrupt ▪ LevelTriggered ▪ EdgeTriggered Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 17
  • 18.  Level Triggered interrupts  INTO and INT1 pins are normally high (just like all I/O port pins)  Interrupt 1 type control bit (TCON.0) / Interrupt 1 type control bit (TCON.2)ofTCON register goes high after 8051 sense such type of interrupt  if a low-level signal is applied to them, it triggers the interrupt.  Then the microcontroller stops whatever it is doing and jumps to the interrupt vector table to service that interrupt.  This is called a level-triggered or level-activated interrupt and is the default mode upon reset of the 8051. Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 18
  • 19.  if the low-level interrupt signal is not removed before the ISR is finished it is interpreted as another interrupt and the 8051 jumps to the vector table to execute the ISR again.  EdgeTriggered interrupts  Upon reset the 8051 makes INTO and INT1 low-level triggered interrupts.  To make them edge-triggered interrupts, we must program the IE0 (TCON.1) External Interrupt 0 Flag and IE1 (TCON.3) External Interrupt 1 Flag bits of theTCON register. Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 19
  • 20.  Serial communication has a single interrupt that belongs to both receive and transfer  The interruptVectorTable Location 0023H belongs to this interrupt  Used to both send and receive data  If the interrupt bit in IE is enabled, when RI andTI is raised, 8051 gets interrupted and jumps to memory location 0023H to execute ISR Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 20
  • 21.  TI (Transfer Interrupt) is raised when the last bit of the framed data, stop bit is transferred indicating that the SBUF register is ready to transfer next byte  RI (Receive Interrupt) is raised when the received byte needs to be picked up before it is lost by new incoming serial data Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 21
  • 22. Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 22
  • 23. Interrupts ROM Location (HEX) Pin Flag Clearing Reset 0000 9 Auto External Hardware Interrupt 0 (INT0) 0003 P3.2 (12) Auto Timer 0 Interrupt (TF0) 000B Auto External Hardware Interrupt 1 (INT1) 0013 P3.3 (13) Auto Timer 1 Interrupt (TF1) 001B Auto Serial com Interrupt (RI and TI) 0023 Programmer Clears it Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 23
  • 24. Interrupts Flag SFR Register Bit External Hardware Interrupt 0 IE0 TCON.1 Timer 0 Interrupt TF0 TCON.5 External Hardware Interrupt 1 IE1 TCON.3 Timer 1 Interrupt TF1 TCON.7 Serial com Interrupt TI SCON.1 Timer 2 Interrupt TF2 T2CON.7 (AT89C52) Timer 2 Interrupt EXF2 T2CON.6 (AT89C52) Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 24
  • 25.  “The 8051 Microcontroller and Embedded Systems usingAssembly and C” , Muhammad Ali Mazidi, Janice Gillispie Mazidi, Rolin D. McKinlay, Second Edition, Pearson publication  http://what-when-how.com/8051- microcontroller/programming-external- hardware-interrupts/ Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 25
  • 26. Prepared By: Ms. K. D. Patil, Dept. of InformationTechnology, Sanjivani COE, Kopargaon 26