Past exam question: Assignment 3, Q4(c)
Open in the Padhaiko app8255 PPI is mapped at base address of 7F00H using memory mapped I/O is used to control operation of lathe. The microcomputer reads instruction code from tape reader on handshake basis and sends appropriate control words to lathe. c) Describe with required timing diagrams has instruction code from tape reader is read by microprocessor and sends to lathe?
Solution
Reading Instruction Code from Tape Reader (Mode 1 Strobed Input on Port A):
- The tape reader places the 8-bit instruction byte on
PA7–PA0and pulses () LOW to latch the data into Port A's input register. - The 8255 drives () HIGH to acknowledge receipt and prevent the tape reader from sending new data prematurely.
- Once returns HIGH (with and ), the 8255 asserts () HIGH to interrupt the 8085.
- The 8085 executes the ISR and reads Port A (
LDA 7F00H), asserting LOW. The falling edge of clears , and the rising edge resets LOW so the tape reader can send the next byte.
DATA (PA0-7) -------<======== Valid Instruction Byte ========>-------
______ _______
STB_A' (PC4) \________________________________________/
______________________________________________
IBF_A (PC5) _________/ \___
___
INTR_A (PC3) __________________________________________________/ \_____
____
RD' (8085) ------------------------------------------------/ \-----Sending Control Word to Lathe (Mode 1 Strobed Output on Port B):
- The 8085 writes the lathe control byte to Port B (
STA 7F01H), pulsing LOW. - On the rising edge of , the 8255 drives () LOW, signaling the lathe that valid control data is present on
PB7–PB0(and clearing ). - The lathe reads
PB7–PB0and responds with an active-low () pulse, which resets HIGH. - On the rising edge of (with and ), () goes HIGH to notify the 8085 that the lathe is ready for the next control word.
______ ____
WR' (8085) \___/ \-------------------------------------------
DATA (PB0-7) -------<========== Valid Control Word ==========>-----------
_______________________________
OBF_B' (PC1) ------------/ (LOW active) \_______________
____
ACK_B' (PC2) --------------------------------/ \----------------------
____ ______________________
INTR_B (PC0) \_______________________________/In Mode 1 Input (Port A), the tape reader asserts to latch instruction data, raising and then ; the 8085 reads 7F00H ( low), clearing and . In Mode 1 Output (Port B), the 8085 writes the lathe control word to 7F01H ( low), driving low until the lathe returns , which raises for the next transfer.