- 2068 Baisakh (old course) · 5 marks
8255A at 80H: addresses, mode 0/1 words, BSR
Short answer
Port A 80H, B 81H, C 82H, control 83H. Control word for PA mode 0 out, PB mode 1 in, PC upper out, PC lower in is 87H. To enable Port B interrupt, set PC2 using BSR control word 05H (PC2 set, INTE_B=1).
An 8255A PPI connected to 8085 has a system base address of 80H. (i) What are the addresses assigned for Port A, Port B, Port C and control register? (ii) Write down the control word to initialize this card as follows: Port A mode 0 output, Port B handshake input, Port C upper output and remaining pin of Port C lower input. (iii) For above case, write down bit set/reset control word to initialize Port B interrupt request.
(i) Addresses
Base address 80H, so A1 A0 select the register: Port A = 80H, Port B = 81H, Port C = 82H, Control register = 83H.
(ii) Control word
- Port A mode 0 output: D6D5 = 00, D4 = 0.
- Port B handshake input: mode 1 (D2 = 1), input (D1 = 1).
- Port C upper output: D3 = 0.
- Remaining pins of port C lower input: D0 = 1. (In mode 1, PC0-PC2 are used for handshake, and the remaining pin PC3 is set as input.)
- D7 = 1 (mode set).
D7 D6 D5 D4 D3 D2 D1 D0
1 0 0 0 0 1 1 1 = 87H
Control word = 87H.
(iii) BSR control word for Port B interrupt
In mode 1 the interrupt enable of port B (INTE_B) is bit PC2 for both input and output. To set PC2: D7 = 0 (BSR), D6-D4 = 000, D3D2D1 = 010 (bit 2), D0 = 1 (set) = 0000 0101 = 05H.
MVI A,87H
OUT 83H
MVI A,05H
OUT 83H ; INTE_B = 1
Now INTR_B (PC0) is raised when data arrives at port B.
✓ Answer checked by Claude Sonnet 5.5
Related questions
- 8255A card at F3H with keyboard and display · Instrumentation II, chapter 2
- ADC at 80H with 8255A: display on port B LEDs · Instrumentation II, chapter 2
- 8255A at B0H: add port A and B, show on port C · Instrumentation II, chapter 2
- Keyboard and printer with 8255A at 4044H · Instrumentation II, chapter 2
- Centronics printer with 8255A in mode 1 · Instrumentation II, chapter 2
- 8255 at A0A0H: interface and control words · Instrumentation II, chapter 2
- Address decoding for 8 LEDs output port · Microprocessor, chapter 4
- 8086 ALP: words on lines and word count · Microprocessor, chapter 3