Top Banner
28
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Interrupts
Page 2: Interrupts

What is an Interrupt?

It means interrupting the normal execution of the microprocessor.

Page 3: Interrupts

Steps whenever there is an interrupt?

current

PC PC contents are stored in stack

100

101

102

103

104

103

103

STACK

SP

Page 4: Interrupts

4

Interrupts in 8085

Main routine

Interrupt

Save program counter

Disable interrupts

Send out interupt acknowledge

Service routine

INTA

Go to service routine

Get original program counter

Go back

EI

RET

Page 5: Interrupts

HARDWARE INTERRUPT

It is a special signal from an I/O device to the computer.

Page 6: Interrupts

SOFTWARE INTERRUPT

It is generated by a program interrupt instructions in the CPU.

Page 7: Interrupts

TYPES OF INTERRUPTS

MASKABLE & NON- MASKABLE INTERRUPTS

VECTORED & NON-VECTORED INTERRUPTS

EDGE TRIGGERED & LEVEL TRIGGERED INTERRUPTS

PRIORITY BASED INTERRUPTS

Page 8: Interrupts

MASKABLE INTERRUPTS

EXAMPLE: RST 7.5 RST 6.5 RST 5.5 INTR ONLY TRAP IS A NON MASKABLE

INTERRUPT

Page 9: Interrupts

VECTORED INTERRUPTS

EXAMPLE:

RST 7.5 RST 6.5 RST 5.5 TRAP

Page 10: Interrupts

8085 Interrupts

8085

TRAPRST7.5RST6.5RST 5.5INTRINTA

Page 11: Interrupts

The addresses to which program control goes:

NAME VECTOR ADDRESSES

RST 7.5 003CH(7.5 X 0008H)

RST 6.5 0034H(6.5 X 0008H)

RST 5.5 002CH(5.5 X 0008H)

TRAP 0024H(4.5 X 0008H)

Absolute address is calculated by multiplying the RST value with 0008H.

Page 12: Interrupts

NON – VECTORED INTERRUPT

EXAMPLE:

INTR is a non vectored interrupt.

Page 13: Interrupts

The 8085 Interrupts

Interrupt name Maskable Vectored

INTR Yes No

RST 5.5 Yes Yes

RST 6.5 Yes Yes

RST 7.5 Yes Yes

TRAP No Yes

Page 14: Interrupts

EDGE TRIGGERED INTERRUPTS

EXAMPLE:

RST 7.5

Page 15: Interrupts

Edge triggering

Rising edge

Falling edge

Page 16: Interrupts

LEVEL TRIGGERED INTERRUPT

EXAMPLE: RST 6.5 RST 5.5 INTR TRAP is EDGE & LEVEL triggered interrupt.

Page 17: Interrupts

Level triggering

Low level

High level

Page 18: Interrupts

PRIORITY BASED INTERRUPTSINTERRUPT PRIORITY

TRAP 1

RST 7.5 2

RST 6.5 3

RST 5.5 4

INTR 5

Page 19: Interrupts

Five hardware interrupts are:

TRAP RST 7.5 RST 6.5 RST 5.5 INTR

Page 20: Interrupts

TRAP (PIN-6)

Non- maskable Has highest priority Can not disable. Edge & level triggered Used for power failure & emergency shut off.

Page 21: Interrupts

RST 7.5

Maskable interrupt.

Has 2nd highest priority.

+ve edge triggered only.

Page 22: Interrupts

RST 6.5

Maskable interrupt.

3rd highest priority.

Level triggered only.

Page 23: Interrupts

RST 5.5

Maskable interrupt.

4th highest priority.

Level triggered only.

Page 24: Interrupts

INTR

Maskable interrupt.

Lowest priority.

Level triggered.

Page 25: Interrupts

INTA’

Stands for Interrupt acknowledge.

Outgoing signal.

Active low signal.

Page 26: Interrupts
Page 27: Interrupts

QUESTIONS FOR YOU

Which interrupt has the highest priority?

Which interrupt has the lowest priority?

Page 28: Interrupts