- 2073 Chaitra · 3 marks
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 address | Registers |
|---|---|---|
| A7=1, others 0 | 80H | 80H, 81H, 82H, 83H |
| A6=1, others 0 | 40H | 40H-43H |
| A7=1, A6=1, rest 0 | C0H | C0H-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
Related questions
- Interfacing ADC0808 with 8085 using 8255A · Instrumentation II, chapter 4
- Keyboard and printer with 8255A at 4044H · Instrumentation II, chapter 2
- 8255A at B0H: add port A and B, show on port C · Instrumentation II, chapter 2
- 8255A at 80H: addresses, mode 0/1 words, BSR · Instrumentation II, chapter 2
- 8255A card at F3H with keyboard and display · Instrumentation II, chapter 2
- Centronics printer with 8255A in mode 1 · Instrumentation II, chapter 2
- 8085 ALP: odd parity transfer with bit change · Microprocessor, chapter 2
- Reactance diagram: 30 MVA, 6.6 kV base, three lines · Power System Analysis I, chapter 3
- Address decoding for input and output ports · Microprocessor, chapter 4
- EI, DI, SIM, RIM and ISR address · Microprocessor, chapter 5