Professional Documents
Culture Documents
8085 Interrupts New
8085 Interrupts New
8085 Interrupts New
INTRODUCTION
P execute instruction in sequence.
For e.g. When an I/O device is ready for data transfer, It will send an
interrupt signal to P . When interrupt occurs P will suspend normal
sequence of program execution and branches to a subroutine called
Interrupt Service Subroutine (ISS)
So, in general, Interrupt is a process where an external device can get the
attention from the microprocessor.
Complete ISS
Interrupt
Main routine
Go to
service
Go back
routine
Get EI
original RET
program
counter Service routine
RST 5.5, RST 6.5, RST 7.5, and TRAP are all
automatically vectored interrupts.
INTR, RST 5.5, RST 6.5, and RST 7.5 are all
maskable interrupts.
INTR Yes No
TRAP No Yes
TRAP
RST7.5
RST6.5
RST 5.5 8085
INTR
INTA
▪ RST 7.5, RST 6.5 and RST 5.5 are maskable interrupts,
they are acknowledged only if they are not masked !
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
M5.5
M7.5
M6.5
MSE
SDO
R7.5
SDE
XXX
}
RST5.5 Mask
Serial Data Out 0 - Available
RST6.5 Mask
1 - Masked
RST7.5 Mask
21
10/29/2019 E6-B TKMCE Kollam
SIM Instruction
RST (internal)
((SP) – 1) (PCH)
((SP) – 2) (PCL)
(SP) (SP) – 2
(PC) restart address
The bus idle machine cycle is executed when extra time
or more time is needed for an internal operation of the
processor.During this cycle the status signals S0 ,S1 are
asserted low.The data ,address and control pins are
driven to high impedance state.The READY signal will not
be sampled by the processor in this cycle.
29
Exercises
SOE
XXX
R7.5
MSE
M7.5
M6.5
M5.5
0 0 0 0 1 0 0 0
EI
MVI A,08
SIM
SOE
XXX
R7.5
MSE
M7.5
M6.5
M5.5
0 0 0 0 1 1 1 1
EI
MVI A,0F
SIM
SOE
XXX
R7.5
MSE
M7.5
M6.5
M5.5
0 0 0 1 1 1 0 1
EI
MVI A,1D
SIM
SOE
XXX
R7.5
MSE
M7.5
M6.5
M5.5
0 0 0 0 1 0 1 0
EI
MVI A,0A
SIM
SOE
XXX
R7.5
MSE
M7.5
M6.5
M5.5
0 1 0 0 0 0 0 0
EI
MVI A,40
SIM
SOE
XXX
R7.5
MSE
M7.5
M6.5
M5.5
1 1 0 0 0 0 0 0
EI
MVI A,C0
SIM
P6.5
P7.5
P5.5
IE
RST 6.5
M 6.5
RST 5.5
M 5.5
Interrupt Enable
Flip Flop
M6.5
M7.5
M5.5
P6.5
SDI
P7.5
P5.5
IE
RST5.5 Mask
Serial Data In RST6.5 Mask
RST7.5 Mask
} 0 - Available
1 - Masked
P6.5
P7.5
P5.5
IE
RST 6.5
M 6.5
RST 5.5
M 5.5
Interrupt Enable
Flip Flop
M6.5
M7.5
M5.5
P6.5
SDI
P7.5
P5.5
IE
RST5.5 Mask
Serial Data In RST6.5 Mask
RST7.5 Mask
} 0 - Available
1 - Masked
1K-----210
i.e. 10 address lines are required to interface 1k RAM ie A0-A9
A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
10/29/2019 E6-B TKMCE Kollam 50
A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0000
0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 03FF
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0000
0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 03FF
0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0400
0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 07FF
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0000
0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 03FF
0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0400
0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 07FF
0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0800
0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 0BFF
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0000
0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 03FF
0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0400
0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 07FF
0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0800
0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 0BFF
0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0C00
0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0FFF
CS
PC4-PC7
82C55
A0
A1
PC0-PC3
RD
WR
Vcc PB0-PB7
GND
PC5 12 29 D5
PC4 13 28 D6
PC0 14 27 D7
PC1 15 26 VCC
PC2 16 25 PB7
PC3 17 24 PB6
PB0 18 23 PB5
PB1 19 22 PB4
PB2 20 21 PB3
8 0
10/29/2019 E6-B TKMCE Kollam 80
The following instruction will set all ports as output
MVI A,80H; Control word in accumulator
OUT 03H ; Control word in control word register
Write an ALP to make port A as input and remining
ports as output port?
D7 D6 D5 D4 D3 D2 D1 D0
Modes of Mode of Mode of Port A Port Mode of Port B Port
operation Port A Port A (I/O) Cupper Port B (I/O) C lower
=1 (I/O) (I/O)
1 0 0 1 0 0 0 0
9 0
MVI A,90H; Control word in accumulator
OUT 03H ; Control word in control word register
D7 D6 D5 D4 D3 D2 D1 D0
0 0 0 0 1 0 0 1
MVI A,09H
OUT 03H
D7 D6 D5 D4 D3 D2 D1 D0
0 0 0 0 1 1 1 0
MVI A,0EH
OUT 03H