Interrupt I/O is a data transfer method in which an external device informs the microprocessor that it is ready for communication and requests attention. The 8085 interrupt process is controlled by the Interrupt Enable flip-flop.
The microprocessor is said to be interrupted when the flipflop is enabled and the signal INTR goes high. The instruction
DI are used to set and reset the Interrupt Enable flip-flop respectively.
|EI||Sets the Interrupt Enable flip-flop and enables the interrupt process.
System reset or an interrupt disables the interrupt process.
|DI||Resets the Interrupt Enable flip-flop and disables the interrupt.|
Interrupts in 8085 can be described in terms of the following 8 steps.
- Set the Interrupt Enable flipflop using
- During the execution of each instruction, the microprocessor checks the INTR signal.
- If INTR is high and interuupt is enabled, then the microprocessor disables the Interrupt Enable flipflop and sends an Interrupt Acknowledge signal .
- This signal inserts a
RSTinstruction through external hardware.
- Once the
RSTinstruction is recieved, the microprocessor saves the contents of PC into the stack.
- The program control is then transfered to a specific memory loaction and the corresponding service routine is executed.
- The service routine should include the instruction
- Once the service routine has completed executing, the RET instruction retrieves the memory address the where the program was interrupted and continues the execution.
Types of Interrupts
Maskable and Non-Maskable Interrupts
An interrupt that can be disabled by writing some instructions is referred to as a Maskable Interrupt; otherwise, it is referred to as a Non-Maskable Interrupt.
A software interrupt is a set of instructions that can be inserted into the programme at any time. The 8085 microprocessor has eight software interrupts from RST0 through RST7. The INT instruction is used to initiate a software interrupt. This event immediately terminates programme execution and transfers control to the INT handler. The INT handler is typically part of the operating system and decides the appropriate action. This occurs when an application software terminates or requests specific services from the operating system.
They enable the microprocessor to switch programme control from the main program to the subroutine program. When the subroutine program is finished, the program control returns to the main program.
A hardware interrupt is caused by a hardware device, such as a request to start an I/O, a hardware failure, or something similar. Hardware interrupts were implemented to avoid spending the processor’s crucial time in polling loops waiting for external events.
There are 5 pins available for hardware interrupt in 8085: TRAP, RST 7.5, RST 6.5, RST 5.5 and INTR.