8085 Interupts

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 13

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)

What happens when MP is interrupted ?

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 8085 has 5 interrupt inputs.

The INTR input.


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.

TRAP is the only non-maskable interrupt in the 8085

TRAP is also automatically vectored

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

Interrupt Vectors and the Vector Table

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 8085 Non-Vectored Interrupt Process


1.

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.

8085 Non-Vectored Interrupt Process


6.

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.

Maskable Interrupts and vector locations


RST7.5 Memory RST 7.5
M 7.5

RST 6.5
M 6.5

RST 5.5
M 5.5

INTR
Interrupt Enable Flip Flop

** See Fig 12.5 of the Text Book for a detailed look

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.

The 8085 Interrupts


Interrupt Name INTR RST 5.5 / RST 6.5 RST 7.5 Maskable Masking Method DI / EI DI / EI SIM DI / EI SIM Vectored Memory Triggering Method

Yes Yes Yes

No Yes Yes

No No Yes

Level Sensitive
Level Sensitive Edge Sensitive Level & Edge Sensitive

TRAP

No

None

Yes

No

You might also like