- 2069 Chaitra · 1+3+2+2 marks
Keyboard and printer with 8255A at 4044H
Short answer
Base 4044H: port A=4044H, B=4045H, C=4046H, control=4047H. Control word A6H configures port A mode 1 output (printer) and port B mode 1 input (keyboard). Enable port A interrupt with BSR 0DH (set PC6, INTE_A).
In a microprocessor based system, an 8255A PPI card is used to interface a keyboard and a printer to the processor. The 8255A PPI is interfaced with the 8085 microprocessor in the system such that the base address of 8255 A PPI is 4044 H. (a) What are the addresses captured by the card? (b) Draw the complete interfacing circuit of 8255A PPI with 8085 for the given system. (c) If the printer is interfaced to port A and the keyboard is interfaced to port B of the PPI generate the control word to initialize the 8255A PPI with proper explanations. Both printer and keyboard use 8-bit parallel data transfer with handshaking. (d) Derive the control word to enable interrupt request to the microprocessor by port A of 8255A PPI in above system, with proper explanations.
(a) Addresses
Base 4044H = 0100 0000 0100 0100. The 8255 uses A1 A0 for the register, so A15-A2 = 01 0000 0001 0001 are decoded: Port A = 4044H, Port B = 4045H, Port C = 4046H, Control = 4047H.
(b) Interfacing circuit (memory mapped)
8085 8255A
AD0-AD7 -> 74LS373 (ALE) -> A0,A1 ---> A0, A1
AD0-AD7 ------------------------------> D0-D7
RD' ---------------------------------> RD'
WR' ---------------------------------> WR'
RESET OUT ---------------------------> RESET
A15 [NOT], A14, A13 [NOT], A12 [NOT], A11 [NOT], A10 [NOT],
A9 [NOT], A8 [NOT], A7 [NOT], A6, A5 [NOT], A4 [NOT], A3 [NOT], A2
IO/M ---------------------> all through gates ---> CS' (low when 4044H-4047H, IO/M = 0)
PA0-PA7 <-> printer data PB0-PB7 <- keyboard data
PC7 (OBF_A') -> printer STROBE / DATA READY PC6 (ACK_A') <- printer ACK
PC3 (INTR_A) -> RST 5.5 of 8085
PC2 (STB_B') <- keyboard STROBE PC1 (IBF_B) -> keyboard ACK
PC0 (INTR_B) -> RST 6.5 of 8085 (optional)
(c) Control word
Printer on port A: output with handshake = mode 1 output. Keyboard on port B: input with handshake = mode 1 input. D7 = 1 (mode set); D6D5 = 01 (A mode 1); D4 = 0 (A output); D3 = 0 (PC4, PC5 free, output); D2 = 1 (B mode 1); D1 = 1 (B input); D0 = 0 (PC0-PC2 are used by the group B handshake, so this bit has no effect) = 1010 0110 = A6H.
(d) Control word to enable interrupt from port A
In mode 1 output the interrupt enable INTE_A is bit PC6. BSR word: D7 = 0, D3D2D1 = 110 (PC6), D0 = 1 (set) = 0000 1101 = 0DH. When INTE_A = 1, INTR_A (PC3) goes high after the printer sends ACK' (OBF_A' high), and the 8085 can be interrupted to send the next character.
✓ Answer checked by Claude Sonnet 5.5
Related questions
- 8255A card at F3H with keyboard and display · Instrumentation II, chapter 2
- Keyboard and printer interface in 8255 mode 1 · Instrumentation II, chapter 2
- PCI bus; 8255 printer interface at 5500H · Instrumentation II, chapter 2
- 8255 mode 1 keyboard and printer with decoding · Instrumentation II, chapter 2
- 8-channel ADC interface with 8255 and 8085 · Instrumentation II, chapter 4
- Centronics printer with 8255A in mode 1 · Instrumentation II, chapter 2
- Microprocessor based system and bus organization · Microprocessor, chapter 1 · asked 5×