Interrupt Structure of 8085 Microprocessor 8085 Microprocessor by Ravinder Nath Rajotiya - August 28, 2020February 28, 20220 Share on Facebook Share Send email Mail Print Print Interrupt structure of 8085 microprocessor: 8085 IC has six pins from PIN 6 to PIN 11, reserved for interrupts these are : TRAP, RST 7.5, RST 6.5, RST 5.5 and INTR. PIN 11 is the interrupt acknowledgement (INTA’) that is generated by the 8085 processor in response to the different interrupts that arrive at the interrupt pin. Figure shows the interrupt structure of 8085 microprocessor. Interrupt priority is shown by the decimal numbers on the extreme left of the figure. As can be see that TRAP has the higher priority marked by digit 1 and INTR has the least priority marked by digit 5 on the left of figure. IVT (Interrupt vector table): IVT contains the interrupt service routine addresses Table-1 (IVT interrupt[t vector table) Interrupt Vector address TRAP 0024h RST 7.5 003Ch RST 6.5 0034h RST 5.5 002Ch The interrupt structure is explained in the following paragraphs: TRAP: TRAP is a non-maskable (NMI) and also a vectored interrupt. It is an edge and also level sensitive. TRAP is a highest priority interrupt than any other interrupt, however TRAP has lower priority than HOLD signal issued by the DMA controller. TRAP once arrives then it cannot be disabled. There are however following two ways to clear the TRAP interrupt. By resetting microprocessor (External signal) By giving a high TRAP ACKNOWLEDGE (Internal signal) There TRAP can be overridden by the HOL signal, (i.e., If the processor receives HOLD and TRAP at the same time then HOLD is recognized first and then TRAP is recognized). TRAP is used for such critical applications such as power failure and emergency shut off. RST 7.5, RST6.5 and RST5.5 : These are the maskable and vectored interrupt. The ISR for these interrupt is as at the addresses given in table-1(IVT). Since these interrupts are maskable they can be enabled and disabled by the two instruction : EI (Enable Interrupt) and DI (Disable interrupt) and using the set interrupt mask. These interrupts can be masked with two software instructions these are EI (Enable Instruction) and SIM (set Interrupt Mask) instruction. Table of Contents Toggle SIM(set Interrupt Mask) instruction:RIM (Read Interrupt Mask):Programming Example: SIM(set Interrupt Mask) instruction: This instruction can be used for following purposes: Set mask for RST 7.5, RST 6.5 and RST 5.5 as per the 8-bit content of the accumulator To reset RST RST 7.5 flip flop i.e. if D4=1, RST 7.5 will be reset. Bit D7, D6 control the serial I/O function. If D6=1, it will enable serial I/O and D7 bit used to transmit. RIM (Read Interrupt Mask): We use the RIM instruction to read the status of the mask bits. On execution of RIM instruction, Accumulator is loaded with the current status of the interrupt mask and the pending interrupts if any. Format of the data / status stored in accumulator after the execution of the RIM instruction is shown below: Programming Example: Write assembly instruction for 8085 to enable all the interrupts after reset. EI ; Enable all interrupts MVI A, 00001000b ; unmask all interrupts SIM ; Set mask /unmask Share on Facebook Share Send email Mail Print Print