CASCADING OF 8259 & INTERFACING OF 8259 WITH 8085
Fig - Cascade Connection of 8259
INTERFACING 8259 WITH 8085 MICROPROCESSOR
Working of 8259 with 8085 processor:
- First the 8259 should be programmed by sending Initialization Command Word (ICW) and Operational Command Word (OCW). These command words will inform 8259 about the following,
- Type of interrupt signal (Level triggered / Edge triggered).
- Type of processor (8085/8086).
- Call address and its interval (4 or 8)
- Masking of interrupts.
- Priority of interrupts.
- Type of end of interrupts.
- Once 8259 is programmed it is ready for accepting interrupt signal. When it receives an interrupt through any one of the interrupt lines IR0-IR7 it checks for its priority and also checks whether it is masked or not.
- If the previous interrupt is completed and if the current request has highest priority and unmasked, then it is serviced.
- For servicing this interrupt the 8259 will send INT signal to INTR pin of 8085.
- In response it expects an acknowledge INTA (low) from the processor.
- When the processor accepts the interrupt, it sends three INTA (low) one by one.
- In response to first, second and third INTA (low) signals, the 8259 will supply CALL opcode, low byte of call address and high byte of call address respectively. Once the processor receives the call opcode and its address, it saves the content of program counter (PC) in stack and load the CALL address in PC and start executing the interrupt service routine stored in this call address.