MPMC Module 2 - Lecture 7
MPMC Module 2 - Lecture 7
Subhasish Mahapatra
Sr. Assistant Professor
School of Electronics Engineering (SENSE)
VIT-AP University
E-Mail: [email protected]
CONTENT
Interrupt
Interrupt is a process where an external device can get the attention of the microprocessor.
INTR input
Interrupt
The INTR input is the only non-vectored interrupt Maskable Vectored
name
INTR is maskable using the EI/DI instruction pair INTR Yes No
RST 5.5, RST 6.5, RST 7.5 are all automatically RST 5.5 Yes Yes
RST 6.5 Yes Yes
vectored
RST 7.5 Yes Yes
RST 5.5, RST 6.5, and RST 7.5 are all maskable TRAP No Yes
TRAP is the only non-maskable interrupt in the
8085
TRAP is also automatically vectored
When the Microprocessor receives an interrupt signal, it suspends the currently executing
program and jumps to an Interrupt Service Routine (ISR) to respond to the incoming
interrupt.
There are two ways of redirecting the execution to the ISR depending on whether the
interrupt is vectored or non-vectored.
The vector is already known to the Microprocessor
The device will have to supply the vector to the Microprocessor
The vectors for these interrupts fall in between the vectors of RST instructions. That is why, the
name is RST 5.5 (between RST 5 and RST 6).
RST 7.5 is positive edge sensitive. RST 6.5 and RST 5.5 are level sensitive.
Example: Set the interrupt masks so that RST 5.5 is enabled, RST 6.5 is masked, and RST 7.5 is
enabled.
First, determine the contents of the accumulator
RIM Instruction
RIM Instruction
Since the 8085 has five interrupt lines, interrupts may occur during an ISR and remain
pending.
Using the RIM instruction, the programmer can read the status of the interrupt lines and
find if there are any pending interrupts.
The advantage is being able to find about interrupts on RST 7.5, RST 6.5, and RST 5.5 without
having to enable low level interrupts like INTR.
RIM Instruction:
Example: Set the mask to enable RST 6.5 without modifying the masks for RST 5.5 and RST 7.5.
TRAP
TRAP is the only non-maskable Interrupt.
It does not need to be enabled because it can not be disabled.
It has the highest priority amongst interrupts.
It is edge and level sensitive.
It needs to be high and stay high to be recognized.
Once it is recognized, it won't be recognized again until it goes low, then high again.
TRAP is usually used for power failure and emergency shutoff.