Microprocessor Unit 2
Microprocessor Unit 2
M 7.5
RST 6.5
M 6.5
RST 5.5
M 5.5
INTR
Interrupt
Enable
Flip Flop
1. The interrupt process should be enabled using the
EI instruction.
2. The 8085 checks for an interrupt during the
execution of every instruction.
3. 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.
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.
6. The microprocessor jumps to the specific service
routine.
7. The service routine must include the instruction EI
to re-enable the interrupt process.
8. At the end of the service routine, the RET
instruction returns the execution to where the
program was interrupted.
7 6 5 4 3 2 1 0
M5.5
SDE
XXX
R7.5
M7.5
M6.5
MSE
SDO
RST5.5 Mask
Serial Data Out 0 - Available
RST6.5 Mask
1 - Masked
RST7.5 Mask
SDO
SDE
R7.5
MSE
M7.5
M6.5
M5.5
IE
SDI
RST 6.5
P7.5
P6.5
P5.5
M5.5
M7.5
M6.5
M 6.5
RST 5.5
M 5.5
Interrupt Enable
Flip Flop
7 6 5 4 3 2 1 0
IE
SDI
P6.5
P7.5
P5.5
M5.5
M7.5
M6.5
RST5.5 Mask
Serial Data In 0 - Available
RST6.5 Mask
1 - Masked
RST7.5 Mask
RST5.5 Interrupt Pending
RST6.5 Interrupt Pending
RST7.5 Interrupt Pending Interrupt Enable
Value of the Interrupt Enable
Flip Flop
• Example: Set the mask to enable RST6.5 without
modifying the masks for RST5.5 and RST7.5.
– In order to do this correctly, we need to use the RIM
instruction to find the current settings of the RST5.5
and RST7.5 masks.
– Then we can use the SIM instruction to set the masks
using this information.
– Given that both RIM and SIM use the Accumulator, we
can use some logical operations to masks the un-needed
values returned by RIM and turn them into the values
needed by SIM.
SDO SDI
SDE P7.5
XXX P6.5
R7.5 P5.5
MSE IE
M7.5 M7.5
M6.5 M6.5
M5.5 M5.5
Interrupt Masking Triggerin
Maskable Vectored Memory
Name Method g Method
Level
INTR Yes DI / EI No No
Sensitive
RST 5.5 / DI / EI Level
Yes Yes No
RST 6.5 SIM Sensitive
DI / EI Edge
RST 7.5 Yes Yes Yes
SIM Sensitive
Level &
TRAP No None Yes No Edge
Sensitive