KEE 602 UNIT 1 Lecture 5
KEE 602 UNIT 1 Lecture 5
KEE 602
Unit-1
8085 Interrupts
Neeraj Gupta
Asst. Prof.
EN Department
Contents
1. Introduction
2. Classification
3. Interrupt Architecture
4. Hardware Interrupts
a) Interrupt Execution Sequence
5. Software Interrupt
Unit-I
6. SIM
8085 Interrupts
7. RIM
Neeraj Gupta
Asst Prof. EN Deptt
1. Introduction
Interrupt is a process where an external device can get the attention of the
microprocessor.
Unit-I
8085 Interrupts
Neeraj Gupta
Asst Prof. EN Deptt
4. Hardware Interrupts
TRAP:
• The TRAP interrupt is edge and level sensitive. Hence, to initiate TRAP, the interrupt signal
has to make a low to high transition and then it has to remain high until the interrupt is
recognized. • It has the highest priority among interrupt signals, it need not to be enabled,
and it can not be disabled. Its vector location is 0024H.
RST 7.5
• The RST 7.5 interrupt is edge sensitive (positive edge). To initiate the RST 7.5, the interrupt
signal has to make a low to high transition an it need not remain high until it is recognized. Unit-I
Vector Location: 003CH 8085 Interrupts
• Since the value has been stored in the flip flop, the line does not have to be high when the
microprocessor checks for the interrupt to be recognized. Neeraj Gupta
Asst Prof. EN Deptt
RST 6.5 and 5.5
• The RST 6.5, RST 5.5 and INTR are level sensitive interrupts. Hence for these interrupts
the interrupting signal should remain high until it is recognized.
• Vector Location: 0034 and 002CH respectively
4.1 Interrupt Execution Sequence
Unit-I
8085 Interrupts
Neeraj Gupta
Asst Prof. EN Deptt
4.1 Interrupt Execution Sequence
Unit-I
8085 Interrupts
Neeraj Gupta
Asst Prof. EN Deptt
4.1 Interrupt Execution Sequence
Unit-I
8085 Interrupts
Neeraj Gupta
Asst Prof. EN Deptt
5. Software Interrupt: Restart Instruction
• In 8085 Instruction set, RSTn is actually standing for “Restart n”.
• And in this case, n has a value from 0 to 7 only.
• Thus the eight possible RST instructions are there, e.g. RST 0, RST 1, …, RST 7. They are
1-Byte call instructions.
• RST n = CALL n * 8
• For example, let us consider RST 4 is functionally equivalent to CALL 4*8, i.e. CALL 32 =
CALL 0020H. The advantage of RST 2 is that it is only 1 Byte, whereas CALL 0010H is 3-
Byte long. Thus RST instructions are useful for branching to frequently used subroutines.
Unit-I
8085 Interrupts
Neeraj Gupta
Asst Prof. EN Deptt
6. SIM
• In 8085 Instruction set, SIM stands for “Set Interrupt Mask”. It is 1-Byte instruction and it is a
multi-purpose instruction. The main uses of SIM instruction are –
• Masking/unmasking of RST7.5, RST6.5, and RST5.5
• Reset to 0 RST7.5 flip-flop
• Perform serial output of data
Unit-I
8085 Interrupts
•This is the Mask Set Enable (MSE) bit. This bit can have two values: 0 or 1.
If MSE bit = 0, SIM instruction is not being used for masking or unmasking of Neeraj Gupta
interrupts. In such a case, the LS 3 bits of the Accumulator are not having any Asst Prof. EN Deptt
useful information.
•If MSE bit = 1, the SIM instruction is used for masking or unmasking of
interrupts. Then the LS 3 bits provide information about masking or unmasking of
interrupts.
6. SIM
• In 8085 Instruction set, SIM stands for “Set Interrupt Mask”. It is 1-Byte instruction and it is a
multi-purpose instruction. The main uses of SIM instruction are –
• Masking/unmasking of RST7.5, RST6.5, and RST5.5
• Reset to 0 RST7.5 flip-flop
• Perform serial output of data
Unit-I
8085 Interrupts
Neeraj Gupta
Asst Prof. EN Deptt
This is mask RST7.5 (M7.5) bit. This bit is meaningful only if MSE bit = 1.
If MSE = 1 and M7.5 = 0,RST 7.5 is unmasked.
If MSE = 1 and M7.5 = 1, RST 7.5 is masked.
6. SIM
• In 8085 Instruction set, SIM stands for “Set Interrupt Mask”. It is 1-Byte instruction and it is a
multi-purpose instruction. The main uses of SIM instruction are –
• Masking/unmasking of RST7.5, RST6.5, and RST5.5
• Reset to 0 RST7.5 flip-flop
• Perform serial output of data
Unit-I
8085 Interrupts
Neeraj Gupta
Asst Prof. EN Deptt
Bit 1: This is M6.5 bit, used for masking/unmasking of RST6.5. It is
similar to M7.5 bit.
Bit 0: This is M5.5 bit, used for masking/unmasking of RST5.5. It is
similar to M7.5 bit.
6. SIM
• In 8085 Instruction set, SIM stands for “Set Interrupt Mask”. It is 1-Byte instruction and it is a
multi-purpose instruction. The main uses of SIM instruction are –
• Masking/unmasking of RST7.5, RST6.5, and RST5.5
• Reset to 0 RST7.5 flip-flop
• Perform serial output of data
Unit-I
8085 Interrupts
Bit D4: Bit 4 (R7.5) of Accumulator is used for
resetting to 0 RST 7.5 flip-flop output when SIM Neeraj Gupta
instruction is executed. Asst Prof. EN Deptt
Unit-I
8085 Interrupts
Neeraj Gupta
Asst Prof. EN Deptt
7. RIM
• In 8085 Instruction set, Read Interrupt Mask. It is a 1-Byte multi-purpose instruction. It is
used for the following purposes.
• To check whether RST7.5, RST6.5, and RST5.5 are masked or not;
• To check whether interrupts are enabled or not;
• To check whether RST7.5, RST6.5, or RST5.5 interrupts are pending or not;
• To perform serial input of data.
Unit-I
8085 Interrupts
Neeraj Gupta
Asst Prof. EN Deptt
7. RIM
Unit-I
8085 Interrupts
Neeraj Gupta
Asst Prof. EN Deptt
7. RIM
Unit-I
8085 Interrupts
Neeraj Gupta
Asst Prof. EN Deptt
7. RIM
Unit-I
8085 Interrupts
Neeraj Gupta
Asst Prof. EN Deptt
THANK YOU Unit-I
8085 Interrupts
Neeraj Gupta
Asst Prof. EN Deptt