SlideShare a Scribd company logo
1 of 19
4/22/2020Meena Kushwaha
1
 To set up communication between microprocessor & I/O devices either
Polling or Interrupt method is used.
 Interrupt is an initiative taken by external device to grab the attention of
the μP.
 The process is asynchronous, can occur at any time during execution of
program.
 An interrupt is considered as an emergency signal which should be
responded by the microprocessor as soon as possible.
4/22/2020Meena Kushwaha 2
 When the Microprocessor receives an interrupt signal, it suspends
the currently executing program for a while and jumps to an
Interrupt Service Routine (ISR) to respond to the incoming
interrupt.
 Each interrupt will most probably have its own ISR.
 When the interrupt signal arrives:
1. The processor will break its routine
2. Go to a different routine (interrupt service routine)
3. Complete the interrupt service routine(ISR)
4. Come back to the “regular” routine
4/22/2020Meena Kushwaha 3
4/22/2020Meena Kushwaha 4
Interrupts can be classified into two types:
Maskable Interrupts (Can be delayed or Rejected)
Non-Maskable Interrupts (Can not be delayed or Rejected)
Interrupts can also be classified into:
Vectored : The address of the subroutine is already known to the
Microprocessor
Non-vectored (the address of the service routine needs to be
supplied externally by the device)
Interrupts can also be classified into:
Hardware Interrupt [TRAP, RST7.5, RST6.5, RST5.5,INTR]
Software Interrupt [RST n]
4/22/2020Meena Kushwaha 5
 Hardware interrupt is Asynchronous (it can occur at any
time).
 The 8085 has five hardware interrupts
(1)TRAP
(2)RST7.5
(3)RST6.5
(4)RST5.5
(5)INTR(address is supplied externally)
Interrupt Name Maskable Vectored
INTR Yes No
RST 5.5 Yes Yes
RST 6.5 Yes Yes
RST 7.5 Yes Yes
TRAP No Yes 4/22/2020Meena Kushwaha 6
 EI : one byte instruction.
This instruction is used to Enable the maskable interrupts.
 DI : one byte instruction.
This instruction is used to Disable the maskable interrupts.
 The 8085 has a single Non-Maskable interrupt, i.e. TRAP.
4/22/2020Meena Kushwaha 7
M
7.5
M
6.5
M
5.5
4/22/2020Meena Kushwaha 8
 These two instructions are used for Interrupts as well as for Serial Communication.
SIM: Set Interrupt Mask and send data serially (bit by bit).
RIM: Read Interrupt Mask and read data serially (bit by bit).
4/22/2020Meena Kushwaha 9
Example: W.A.P to
• Set the interrupt masks so
that
 RST5.5 is enabled,
 RST6.5 is masked,
 and RST7.5 is enabled.
• Send ‘1’ through pin number 4
of 8085.
4/22/2020Meena Kushwaha 10
 First, determine the contents to write in the accumulator
Enable 5.5 bit 0 = 0
Disable 6.5 bit 1 = 1
Enable 7.5 bit 2 = 0
Allow setting the masks bit 3 = 1
Don’t reset the flip flop bit 4 = 0
Bit 5 is not used bit 5 = 0
Don’t use serial data bit 6 = 1
Serial data is ignored bit 7 = 1
 Code for above setting is : CA H
 Assembly Language Program:
EI #Enable interrupts including INTR
MVI A, 0A #Prepare the mask to enable RST 7.5, and 5.5, disable 6.5
SIM #Apply the settings RST masks
1 1 0 0 1 0 1 0
4/22/2020Meena Kushwaha 11
 When RIM instruction is executed an
8-bit data is loaded in accumulator,
which can be interpreted as shown in
fig.
 RIM does the following tasks:
1. Read the interrupt mask (bit 2, 1, 0).
2. Identify pending interrupts (bit 6, 5, 4).
3. Check the Interrupt flag.
4. Receive serial input data bit (bit 7).
4/22/2020Meena Kushwaha 12
 Decode the content of Accumulator if you get 28 H after writing RIM.
0 0 1 0 1 0 0 0
4/22/2020Meena Kushwaha 13
 It is a instruction based Interrupt which is completely control by software.
 That means programmer can use this instruction to execute interrupt in main
program.
 There are 8 software interrupt available in 8085 μP that are RST 0 to RST 7.
 The vector address for these interrupts can be calculated as:
Interrupt number * 8 (in decimal) = Vector Address (in Hexa)
For e.g., Vector address for interrupt RST5 is 0028H. This vector address is stored in
Program Counter(PC).
 These instruction allow transfer of program control from the main program to
predefined service routine is also referred to as ISR (Interrupt Service Routine).
4/22/2020Meena Kushwaha 14
Interrupt Interrupt number * 8
(in decimal)
Vector Address
(in Hexa)
RST 0 0 x 8 = 0 0000 H
RST 1 1 x 8 = 8 0008 H
RST 2 2 x 8 = 16 0010 H
RST 3 3 x 8 = 24 0018 H
RST 4 4 x 8 = 32 0020 H
RST 4.5 (TRAP) 4.5 x 8 = 36 0024 H
RST 5 5 x 8 = 40 0028 H
RST 5.5 5.5 x 8 = 44 002C H
RST 6 6 x 8 = 48 0030 H
RST 6.5 6.5 x 8 = 52 0034 H
RST 7 7 x 8 = 56 0038 H
RST 7.5 7.5 x 8 = 60 003C H
Restart Instruction Equivalent to
RST0 CALL 0000H
RST1 CALL 0008H
RST2 CALL 0010H
RST3 CALL 0018H
RST4 CALL 0020H
RST5 CALL 0028H
RST6 CALL 0030H
RST7 CALL 0038H
4/22/2020Meena Kushwaha 15
 TRAP (RST 4.5), RST 5.5, RST 6.5, RST 7.5 and RST n
 In general RST (internal)
((SP) – 1) (PCH)
((SP) – 2) (PCL)
(SP) (SP) – 2
(PC) restart address
4/22/2020Meena Kushwaha 16
4/22/2020Meena Kushwaha 17
4/22/2020Meena Kushwaha 18
 8259 (PIC) is used to expand the interrupts of 8085.
 It is connected to INTR pin of 8085. One 8259 can accept 8 interrupt requests and
allow one by one to the microprocessor.
 It manages 8 interrupts according to the instructions written into its control
registers.
 The priorities of interrupts are programmable.
 8259 can be programmed to accept either level triggered or edge triggered.
 The interrupts can be masked or unmasked individually.
 The 8259s can be cascaded to expand the interrupts up to 64.
4/22/2020Meena Kushwaha 19

More Related Content

What's hot

L13 interrupts-in-atmega328 p
L13 interrupts-in-atmega328 pL13 interrupts-in-atmega328 p
L13 interrupts-in-atmega328 prsamurti
 
L15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 pL15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 prsamurti
 
SIM Instruction use in 8085 microprocessor
SIM Instruction use in 8085 microprocessorSIM Instruction use in 8085 microprocessor
SIM Instruction use in 8085 microprocessorASHISH MANI
 
Uart VHDL RTL design tutorial
Uart VHDL RTL design tutorialUart VHDL RTL design tutorial
Uart VHDL RTL design tutorialNabil Chouba
 
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
 
PowerMate15 Technical Specification
PowerMate15 Technical SpecificationPowerMate15 Technical Specification
PowerMate15 Technical SpecificationRimsky Cheng
 
Microprocessor archetecture
Microprocessor archetectureMicroprocessor archetecture
Microprocessor archetectureRuchi Srivastava
 
Part-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentPart-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentFastBit Embedded Brain Academy
 
Dsp interrupciones
Dsp interrupcionesDsp interrupciones
Dsp interrupcionesJuan Villeda
 
LINUX RS232程式設計
LINUX RS232程式設計LINUX RS232程式設計
LINUX RS232程式設計艾鍗科技
 

What's hot (16)

L13 interrupts-in-atmega328 p
L13 interrupts-in-atmega328 pL13 interrupts-in-atmega328 p
L13 interrupts-in-atmega328 p
 
L15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 pL15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 p
 
SIM Instruction use in 8085 microprocessor
SIM Instruction use in 8085 microprocessorSIM Instruction use in 8085 microprocessor
SIM Instruction use in 8085 microprocessor
 
At89c4051
At89c4051At89c4051
At89c4051
 
89 c2051
89 c205189 c2051
89 c2051
 
Uart VHDL RTL design tutorial
Uart VHDL RTL design tutorialUart VHDL RTL design tutorial
Uart VHDL RTL design tutorial
 
Interrupts
InterruptsInterrupts
Interrupts
 
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
 
PowerMate15 Technical Specification
PowerMate15 Technical SpecificationPowerMate15 Technical Specification
PowerMate15 Technical Specification
 
Microprocessor archetecture
Microprocessor archetectureMicroprocessor archetecture
Microprocessor archetecture
 
Microcontroller part 2
Microcontroller part 2Microcontroller part 2
Microcontroller part 2
 
Part-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentPart-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver development
 
Dsp interrupciones
Dsp interrupcionesDsp interrupciones
Dsp interrupciones
 
Atmel
AtmelAtmel
Atmel
 
LINUX RS232程式設計
LINUX RS232程式設計LINUX RS232程式設計
LINUX RS232程式設計
 
8051 Timers
8051 Timers8051 Timers
8051 Timers
 

Similar to 8085 interrupts (20)

Interrupt11
Interrupt11Interrupt11
Interrupt11
 
Interrupt
InterruptInterrupt
Interrupt
 
Interrupts
InterruptsInterrupts
Interrupts
 
Chapter 4 - Interrupts of 8085
Chapter 4 - Interrupts of 8085Chapter 4 - Interrupts of 8085
Chapter 4 - Interrupts of 8085
 
interrupts.ppt
interrupts.pptinterrupts.ppt
interrupts.ppt
 
B sc e5.2 mp unit 3 interfacing
B sc e5.2 mp unit 3 interfacingB sc e5.2 mp unit 3 interfacing
B sc e5.2 mp unit 3 interfacing
 
1206 Interrupts Of 8085
1206 Interrupts Of 80851206 Interrupts Of 8085
1206 Interrupts Of 8085
 
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
 
Interrupts of microprocessor 8085
Interrupts of microprocessor  8085Interrupts of microprocessor  8085
Interrupts of microprocessor 8085
 
8087 COPROCESSOR connection with 8086 and other processors
8087 COPROCESSOR connection with 8086 and other processors8087 COPROCESSOR connection with 8086 and other processors
8087 COPROCESSOR connection with 8086 and other processors
 
Interruptsof8085
Interruptsof8085Interruptsof8085
Interruptsof8085
 
Introduction to Interrupts of 8085 microprocessor
Introduction to Interrupts of 8085 microprocessorIntroduction to Interrupts of 8085 microprocessor
Introduction to Interrupts of 8085 microprocessor
 
Microprocessor Part 4
Microprocessor    Part 4Microprocessor    Part 4
Microprocessor Part 4
 
Timing n interrupt.pptx
Timing n interrupt.pptxTiming n interrupt.pptx
Timing n interrupt.pptx
 
EE6502 Microprocessor and Microcontroller
EE6502   Microprocessor and MicrocontrollerEE6502   Microprocessor and Microcontroller
EE6502 Microprocessor and Microcontroller
 
Microprocessor.pptx
Microprocessor.pptxMicroprocessor.pptx
Microprocessor.pptx
 
Interrupt 8085
Interrupt 8085Interrupt 8085
Interrupt 8085
 
8085 interrupts
8085 interrupts8085 interrupts
8085 interrupts
 
Important questions
Important questionsImportant questions
Important questions
 
Important questions
Important questionsImportant questions
Important questions
 

Recently uploaded

HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 

Recently uploaded (20)

HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 

8085 interrupts

  • 2.  To set up communication between microprocessor & I/O devices either Polling or Interrupt method is used.  Interrupt is an initiative taken by external device to grab the attention of the μP.  The process is asynchronous, can occur at any time during execution of program.  An interrupt is considered as an emergency signal which should be responded by the microprocessor as soon as possible. 4/22/2020Meena Kushwaha 2
  • 3.  When the Microprocessor receives an interrupt signal, it suspends the currently executing program for a while and jumps to an Interrupt Service Routine (ISR) to respond to the incoming interrupt.  Each interrupt will most probably have its own ISR.  When the interrupt signal arrives: 1. The processor will break its routine 2. Go to a different routine (interrupt service routine) 3. Complete the interrupt service routine(ISR) 4. Come back to the “regular” routine 4/22/2020Meena Kushwaha 3
  • 5. Interrupts can be classified into two types: Maskable Interrupts (Can be delayed or Rejected) Non-Maskable Interrupts (Can not be delayed or Rejected) Interrupts can also be classified into: Vectored : The address of the subroutine is already known to the Microprocessor Non-vectored (the address of the service routine needs to be supplied externally by the device) Interrupts can also be classified into: Hardware Interrupt [TRAP, RST7.5, RST6.5, RST5.5,INTR] Software Interrupt [RST n] 4/22/2020Meena Kushwaha 5
  • 6.  Hardware interrupt is Asynchronous (it can occur at any time).  The 8085 has five hardware interrupts (1)TRAP (2)RST7.5 (3)RST6.5 (4)RST5.5 (5)INTR(address is supplied externally) Interrupt Name Maskable Vectored INTR Yes No RST 5.5 Yes Yes RST 6.5 Yes Yes RST 7.5 Yes Yes TRAP No Yes 4/22/2020Meena Kushwaha 6
  • 7.  EI : one byte instruction. This instruction is used to Enable the maskable interrupts.  DI : one byte instruction. This instruction is used to Disable the maskable interrupts.  The 8085 has a single Non-Maskable interrupt, i.e. TRAP. 4/22/2020Meena Kushwaha 7
  • 9.  These two instructions are used for Interrupts as well as for Serial Communication. SIM: Set Interrupt Mask and send data serially (bit by bit). RIM: Read Interrupt Mask and read data serially (bit by bit). 4/22/2020Meena Kushwaha 9
  • 10. Example: W.A.P to • Set the interrupt masks so that  RST5.5 is enabled,  RST6.5 is masked,  and RST7.5 is enabled. • Send ‘1’ through pin number 4 of 8085. 4/22/2020Meena Kushwaha 10
  • 11.  First, determine the contents to write in the accumulator Enable 5.5 bit 0 = 0 Disable 6.5 bit 1 = 1 Enable 7.5 bit 2 = 0 Allow setting the masks bit 3 = 1 Don’t reset the flip flop bit 4 = 0 Bit 5 is not used bit 5 = 0 Don’t use serial data bit 6 = 1 Serial data is ignored bit 7 = 1  Code for above setting is : CA H  Assembly Language Program: EI #Enable interrupts including INTR MVI A, 0A #Prepare the mask to enable RST 7.5, and 5.5, disable 6.5 SIM #Apply the settings RST masks 1 1 0 0 1 0 1 0 4/22/2020Meena Kushwaha 11
  • 12.  When RIM instruction is executed an 8-bit data is loaded in accumulator, which can be interpreted as shown in fig.  RIM does the following tasks: 1. Read the interrupt mask (bit 2, 1, 0). 2. Identify pending interrupts (bit 6, 5, 4). 3. Check the Interrupt flag. 4. Receive serial input data bit (bit 7). 4/22/2020Meena Kushwaha 12
  • 13.  Decode the content of Accumulator if you get 28 H after writing RIM. 0 0 1 0 1 0 0 0 4/22/2020Meena Kushwaha 13
  • 14.  It is a instruction based Interrupt which is completely control by software.  That means programmer can use this instruction to execute interrupt in main program.  There are 8 software interrupt available in 8085 μP that are RST 0 to RST 7.  The vector address for these interrupts can be calculated as: Interrupt number * 8 (in decimal) = Vector Address (in Hexa) For e.g., Vector address for interrupt RST5 is 0028H. This vector address is stored in Program Counter(PC).  These instruction allow transfer of program control from the main program to predefined service routine is also referred to as ISR (Interrupt Service Routine). 4/22/2020Meena Kushwaha 14
  • 15. Interrupt Interrupt number * 8 (in decimal) Vector Address (in Hexa) RST 0 0 x 8 = 0 0000 H RST 1 1 x 8 = 8 0008 H RST 2 2 x 8 = 16 0010 H RST 3 3 x 8 = 24 0018 H RST 4 4 x 8 = 32 0020 H RST 4.5 (TRAP) 4.5 x 8 = 36 0024 H RST 5 5 x 8 = 40 0028 H RST 5.5 5.5 x 8 = 44 002C H RST 6 6 x 8 = 48 0030 H RST 6.5 6.5 x 8 = 52 0034 H RST 7 7 x 8 = 56 0038 H RST 7.5 7.5 x 8 = 60 003C H Restart Instruction Equivalent to RST0 CALL 0000H RST1 CALL 0008H RST2 CALL 0010H RST3 CALL 0018H RST4 CALL 0020H RST5 CALL 0028H RST6 CALL 0030H RST7 CALL 0038H 4/22/2020Meena Kushwaha 15
  • 16.  TRAP (RST 4.5), RST 5.5, RST 6.5, RST 7.5 and RST n  In general RST (internal) ((SP) – 1) (PCH) ((SP) – 2) (PCL) (SP) (SP) – 2 (PC) restart address 4/22/2020Meena Kushwaha 16
  • 19.  8259 (PIC) is used to expand the interrupts of 8085.  It is connected to INTR pin of 8085. One 8259 can accept 8 interrupt requests and allow one by one to the microprocessor.  It manages 8 interrupts according to the instructions written into its control registers.  The priorities of interrupts are programmable.  8259 can be programmed to accept either level triggered or edge triggered.  The interrupts can be masked or unmasked individually.  The 8259s can be cascaded to expand the interrupts up to 64. 4/22/2020Meena Kushwaha 19