itft_interrupt

25

Upload: shilpa-sharma

Post on 06-May-2015

227 views

Category:

Education


0 download

DESCRIPTION

Interrupts of intel 8085

TRANSCRIPT

Page 1: ITFT_Interrupt
Page 2: ITFT_Interrupt

What is an Interrupt?

• It means interrupting the normal execution of the microprocessor.

Page 3: ITFT_Interrupt

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: ITFT_Interrupt

4

Interrupts in 8085

Main routine

Interrupt

Save program counter

Disable interrupts

Send out interupt acknowledge

Service routine

Go to service routine

Get original program counter

Go back

EI

RET

Page 5: ITFT_Interrupt

HARDWARE INTERRUPT

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

Page 6: ITFT_Interrupt

SOFTWARE INTERRUPT

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

Page 7: ITFT_Interrupt

TYPES OF INTERRUPTS

• MASKABLE & NON- MASKABLE INTERRUPTS

• VECTORED & NON-VECTORED INTERRUPTS

• EDGE TRIGGERED & LEVEL TRIGGERED INTERRUPTS

• PRIORITY BASED INTERRUPTS

Page 8: ITFT_Interrupt

MASKABLE INTERRUPTS

EXAMPLE:

• RST 7.5

• RST 6.5

• RST 5.5

• INTR

• ONLY TRAP IS A NON MASKABLE INTERRUPT

Page 9: ITFT_Interrupt

VECTORED INTERRUPTS

EXAMPLE:

• RST 7.5

• RST 6.5

• RST 5.5

• TRAP

Page 10: ITFT_Interrupt

8085 Interrupts

8085

TRAP

RST7.5

RST6.5

RST 5.5

INTR

INTA

Page 11: ITFT_Interrupt

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: ITFT_Interrupt

NON – VECTORED INTERRUPT

EXAMPLE:

• INTR is a non vectored interrupt.

Page 13: ITFT_Interrupt

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: ITFT_Interrupt

EDGE TRIGGERED INTERRUPTSEXAMPLE:

• RST 7.5

Page 15: ITFT_Interrupt

Edge triggering

Rising edge

Falling edge

Page 16: ITFT_Interrupt

LEVEL TRIGGERED INTERRUPTEXAMPLE:

• RST 6.5

• RST 5.5

• INTR

• TRAP is EDGE & LEVEL triggered interrupt.

Page 17: ITFT_Interrupt

Level triggering

Low level

High level

Page 18: ITFT_Interrupt

PRIORITY BASED INTERRUPTS

INTERRUPT PRIORITY

TRAP 1

RST 7.5 2

RST 6.5 3

RST 5.5 4

INTR 5

Page 19: ITFT_Interrupt

Five hardware interrupts are:• TRAP

• RST 7.5

• RST 6.5

• RST 5.5

• INTR

Page 20: ITFT_Interrupt

TRAP (PIN-6)

• Non- maskable

• Has highest priority

• Can not disable.

• Edge & level triggered

• Used for power failure & emergency shut off.

Page 21: ITFT_Interrupt

RST 7.5

• Maskable interrupt.

• Has 2nd highest priority.

• +ve edge triggered only.

Page 22: ITFT_Interrupt

RST 6.5

• Maskable interrupt.

• 3rd highest priority.

• Level triggered only.

Page 23: ITFT_Interrupt

RST 5.5

• Maskable interrupt.

• 4th highest priority.

• Level triggered only.

Page 24: ITFT_Interrupt

INTR

• Maskable interrupt.

• Lowest priority.

• Level triggered.

Page 25: ITFT_Interrupt

INTA’

• Stands for Interrupt acknowledge.

• Outgoing signal.

• Active low signal.