Skip to main content

8255 port addresses from decoder figure

Short answer

Decoding: A15-A10=0, A9-A6=1, A5=0, A4A3A2=110 selects O6. Base address 03D8H; ports A, B, C, control at 03D8H, 03D9H, 03DAH, 03DBH.

Specify the addresses for the ports of 8255 PPI shown in figure below. [Figure: Address lines A9 to A6 go to a NAND gate whose output (inverted) drives the active-low enable E2 of a 3x8 decoder. Address lines A15 to A10 go to a second gate whose output drives enable E3. A5 drives the active-low enable E1. A4, A3, A2 are the decoder select inputs. The decoder output O6 (active low) drives CS (active low) of the 8255. Address lines A0 and A1 connect to the 8255 pins A1 and A0 respectively. The 8255 has a data bus connection, ports PA, PB, PC, and RD and WR inputs.]

Assumptions about the figure

  • E2 is active low and is driven through the NAND gate: it is enabled (0) when A9, A8, A7, A6 are all 1.
  • E3 is active high and is driven by a gate of A15-A10 that gives 1 only when all of them are 0 (NOR).
  • E1 is active low, driven by A5: enabled when A5 = 0.
  • The decoder select inputs are C = A4, B = A3, A = A2. Output O6 (active low) means CBA = 110: A4 = 1, A3 = 1, A2 = 0.
  • A1 and A0 select the register of the 8255.

Address calculation

 Line:  A15 A14 A13 A12 A11 A10 | A9 A8 A7 A6 | A5 | A4 A3 A2 | A1 A0
 Value:  0   0   0   0   0   0  |  1  1  1  1 |  0 |  1  1  0  |  x  x
 Binary: 0000 0011 1101 1000 (A1A0 = 00)

Base address = 0000 0011 1101 1000 = 03D8H.

A1 A0PortAddress
0 0Port A03D8H
0 1Port B03D9H
1 0Port C03DAH
1 1Control register03DBH

All 16 address lines are decoded, so the address is unique (full decoding): 03D8H-03DBH.

✓ Answer checked by Claude Sonnet 5.5

All Instrumentation II chapter 2 questions →