8085 Interupts
8085 Interupts
8085 Interupts
Asawari Dudwadkar
Asst. Prof. Dept. of Electronics Engineering
VESIT
Interrupt is a process where an external device can get the attention of the microprocessor. The process starts from the I/O device The process is asynchronous
Classification of Interrupts 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 service routine is hardwired) Non-vectored (the address of the service routine needs to be supplied externally by the device)
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.
The EI instruction is a one byte instruction and is used to Enable the non-maskable interrupts. The DI instruction is a one byte instruction and is used to Disable the non-maskable interrupts.
The 8085 has a single Non-Maskable interrupt.
The non-maskable interrupt is not affected by the value of the Interrupt Enable flip flop
The INTR input is the only non-vectored interrupt. INTR is maskable using the EI/DI instruction pair.
RST 5.5, RST 6.5, RST 7.5 are all automatically vectored.
RST 5.5, RST 6.5, and RST 7.5 are all maskable.
Interrupt name INTR RST 5.5 RST 6.5 RST 7.5 TRAP
Maskable Vectored Yes Yes Yes Yes No No Yes Yes Yes Yes
Software interrupts
The software interrupts are program instructions. These instructions are inserted at desired locations in a program. The 8085 has eight software interrupts from RST 0 to RST 7. The vector address for these interrupts can be calculated as follows. Interrupt number * 8 = vector address For RST 5, 5 * 8 = 40 = 0028H
An interrupt vector is a pointer to where the ISR is stored in memory. All interrupts (vectored or otherwise) are mapped onto a memory area called the Interrupt Vector Table (IVT).
The IVT is usually located in memory page 00 (0000H 00FFH). The purpose of the IVT is to hold the vectors that redirect the microprocessor to the right place when an interrupt arrives.
The interrupt process should be enabled using the EI instruction. The 8085 checks for an interrupt during the execution of every instruction. If INTR is high, MP completes current instruction, disables the interrupt and sends INTA (Interrupt acknowledge) signal to the device that interrupted INTA allows the I/O device to send a RST instruction through data bus. Upon receiving the INTA signal, MP saves the memory location of the next instruction on the stack and the program is transferred to call location (ISR Call) specified by the RST instruction
2.
3.
4.
5.
7.
8.
Microprocessor Performs the ISR. ISR must include the EI instruction to enable the further interrupt within the program. RET instruction at the end of the ISR allows the MP to retrieve the return address from the stack and the program is transferred back to where the program was interrupted.
RST 6.5
M 6.5
RST 5.5
M 5.5
INTR
Interrupt Enable Flip Flop
The 8085 Maskable/Vectored Interrupt Process 1. The interrupt process should be enabled using the EI
instruction.
2.
The 8085 checks for an interrupt during the execution of every instruction.
If there is an interrupt, and if the interrupt is enabled using the interrupt mask, the microprocessor will complete the executing instruction, and reset the interrupt flip flop.
3.
4.
The microprocessor then executes a call instruction that sends the execution to the appropriate location in the interrupt vector table.
5.
When the microprocessor executes the call instruction, it saves the address of the next instruction on the stack. The microprocessor jumps to the specific service routine.
6.
7.
The service routine must include the instruction EI to re-enable the interrupt process.
At the end of the service routine, the RET instruction returns the execution to where the program was interrupted
8.
No Yes Yes
No No Yes
Level Sensitive
Level Sensitive Edge Sensitive Level & Edge Sensitive
TRAP
No
None
Yes
No