---
title: "Changing 8255A base address"
subject: "Instrumentation II"
chapter: 2
key: "semester_5/instrumentation_ii:ppi-base-address-change"
source: https://www.bctengineer.com/q/semester_5/instrumentation_ii/ppi-base-address-change
site: BCT Engineering
---

# Changing 8255A base address

Instrumentation II · Chapter 2: Parallel Interfacing With Microprocessor Based System

- Asked in: 2073 Chaitra, 3 marks
- Answer checked by Claude Sonnet 5.5 on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/instrumentation_ii/ppi-base-address-change
- Whole chapter: https://www.bctengineer.com/md/semester_5/instrumentation_ii/chapter-2

## Question

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

## 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.

## Answer

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.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which address lines of the 8085 are normally connected to A0 and A1 of the 8255A?
   A. A6 and A7, to generate CS'
   B. A0 and A1 of the 8085, to select among the four registers
   C. A15 and A14
   D. RD' and WR'
   Answer: B. The 8255 uses A0 and A1 to pick port A, B, C or control; the rest of the address lines form CS'. (Key point: Register select)

2. What determines the base address of the 8255A?
   A. Which remaining address lines are decoded to make CS' and the levels they must have
   B. Only the data bus connections
   C. The control word loaded into the 8255
   D. The clock frequency of the 8085
   Answer: A. Changing the higher lines used for CS' changes the base address. (Key point: What sets base address)

3. If A7 = 1 and A6-A2 = 0 are decoded for CS' in I/O-mapped 8085, what are the port addresses?
   A. 80H to 83H
   B. 00H to 03H
   C. 70H to 73H
   D. F0H to F3H
   Answer: A. A7=1 with the rest 0 gives 1000 00xx = 80H-83H. (Key point: Example)

## Related in Instrumentation II

- [Interfacing ADC0808 with 8085 using 8255A](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Aadc0808-8255-interface) — Instrumentation II, chapter 4
- [Keyboard and printer with 8255A at 4044H](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Akbd-printer-ppi-4044h) — Instrumentation II, chapter 2
- [8255A at B0H: add port A and B, show on port C](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Appi-b0h-addition) — Instrumentation II, chapter 2
- [8255A at 80H: addresses, mode 0/1 words, BSR](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Appi-80h-addresses-control) — Instrumentation II, chapter 2
- [8255A card at F3H with keyboard and display](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Appi-f3h-keyboard-display) — Instrumentation II, chapter 2
- [Centronics printer with 8255A in mode 1](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Acentronics-printer-8255-mode1) — Instrumentation II, chapter 2

## Related in other subjects

- [8085 ALP: odd parity transfer with bit change](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3Aalp-8085-odd-parity-transfer) — Microprocessor, chapter 2
- [Reactance diagram: 30 MVA, 6.6 kV base, three lines](https://www.bctengineer.com/question.md?key=semester_4%2Fpower_system_analysis_i%3Areactance-diagram-30mva-g1-motor) — Power System Analysis I, chapter 3
- [Address decoding for input and output ports](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3Adecoder-input-output-port-block-decoder) — Microprocessor, chapter 4
- [EI, DI, SIM, RIM and ISR address](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3Aei-di-sim-rim-vector-address) — Microprocessor, chapter 5
