Skip to main content

Changing 8255A base address

Short answer

The base address is set by the decoding of higher address lines to generate CS'. Changing which lines are decoded or their active levels shifts the address. For instance, decoding A7=1 yields 80H-83H; connecting A0/A1 to different CPU lines changes the register spacing.

Explain how the base address of 8255A is changed with change in address lines of 8085 connection with 8255A?

The 8255A has two address inputs, A0 and A1, which select one of its four registers (port A, port B, port C, control). These are connected to 8085 address lines A0 and A1. The chip select CS' is generated by decoding the remaining address lines. The base address (the port A address) is therefore decided by which address lines are decoded to produce CS' and what levels they must have. Changing the connection of the higher lines changes the base address.

Example (I/O mapped, 8085)

If A7 is connected to CS' through an inverter (linear select, A7 = 1 selects), the ports respond at 80H-83H. A6-A2 are don't care, so images also appear at 84H, 88H, ... If A7-A2 are all decoded (for example A7 = 1 and A6-A2 = 0), the only address is 80H-83H.

Decoded lines (CS' active)Base addressRegisters
A7=1, others 080H80H, 81H, 82H, 83H
A6=1, others 040H40H-43H
A7=1, A6=1, rest 0C0HC0H-C3H

Memory mapped

When 16 lines are used (A15-A2 decoded), the address can be anywhere in the 64K space. For example, A15-A2 = 0101 0000 0000 00 gives 5000H-5003H.

Register-select lines

If the 8255 pins A0 and A1 are connected to higher CPU lines instead of the lowest ones (for example A2 and A3), the registers appear at addresses spaced 4 apart (80H, 84H, 88H, 8CH). Thus the base address depends on the lines used for CS' and for register selection.

✓ Answer checked by Claude Sonnet 5.5

All Instrumentation II chapter 2 questions →