---
title: "ADC at 80H with 8255A: display on port B LEDs"
subject: "Instrumentation II"
chapter: 2
key: "semester_5/instrumentation_ii:adc-8255-80h-leds"
source: https://www.bctengineer.com/q/semester_5/instrumentation_ii/adc-8255-80h-leds
site: BCT Engineering
---

# ADC at 80H with 8255A: display on port B LEDs

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

- Asked in: 2075 Asoj, 1+2+2+3 marks
- Video: [ADC interfacing | with 8086 and 8255 | | MPMC | Lec-46 | Bhanu Priya](https://www.youtube.com/watch?v=TtAsMwhVcAs) — Education 4u
- Answer checked by Claude Sonnet 5.5 on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/instrumentation_ii/adc-8255-80h-leds
- Whole chapter: https://www.bctengineer.com/md/semester_5/instrumentation_ii/chapter-2

## Question

A/D converter requires signal to start the conversion and indicates with the end of conversion signal. 8255A PPI is interfaced with 8085 microprocessors at 80H. Microprocessor reads 8-bits O/P data of the ADC at port A and display the same data to eight LED's connected at port B of 8255A. State any assumptions made. (a) Identify the address captured by the card (b) Determine the necessary control words (c) Draw the schematic interfacing circuit (d) Write a program to perform the operation

## Short answer

8255 I/O mapped at 80H: PA=80H, PB=81H, PC=82H, control=83H. Control word 91H sets PA input, PB output, PC upper out, PC lower in. PC4 starts ADC via WR', PC5 reads data via RD', PC0 senses EOC. Program loops: pulse start, wait for EOC low, read ADC to PA, output to PB LEDs.

## Answer

#### Assumptions
ADC0804 (8-bit): start conversion with a low-to-high edge at WR' (CS' grounded), end of conversion indicated by INTR' going low, data read by making RD' low. 8255 I/O mapped at 80H. Port A reads the ADC, port B drives 8 LEDs through a buffer, port C handles control: PC4 -> WR' (start), PC5 -> RD' (output enable), PC0 <- INTR' (EOC).

#### (a) Addresses
Base 80H: Port A = **80H**, Port B = **81H**, Port C = **82H**, Control = **83H**.

#### (b) Control word
Port A input (D4 = 1), Port B output (D1 = 0), Port C upper output (D3 = 0), lower input (D0 = 1), mode 0, D7 = 1: 1001 0001 = **91H**.

#### (c) Schematic
```text
 8085 -- AD0-AD7, IOR', IOW', RESET, A0,A1, CS' (A7=1 decode) -- 8255
 8255 PA0-PA7 <---------- D0-D7 of ADC0804
 8255 PC4 ---------------> WR'  (start)
 8255 PC5 ---------------> RD'  (output enable)
 8255 PC0 <--------------- INTR' (end of conversion)
 8255 PB0-PB7 ----> 74LS244 ----[330 ohm]---> 8 LEDs ---> GND (bit = 1 lights the LED)
 ADC0804: VIN+ <- analog input, CS' = GND, CLK R and C network
```

#### (d) Program
```text
        MVI A,91H
        OUT 83H         ; initialise 8255
        MVI A,30H       ; WR' = 1, RD' = 1 (idle)
        OUT 82H
LOOP:   MVI A,20H       ; WR' = 0
        OUT 82H
        MVI A,30H       ; WR' = 1 (rising edge starts conversion)
        OUT 82H
WAIT:   IN 82H
        ANI 01H         ; INTR' (EOC) low when finished
        JNZ WAIT
        MVI A,10H       ; RD' = 0 (enable ADC output)
        OUT 82H
        IN 80H          ; read digital value
        OUT 81H         ; display on LEDs
        MVI A,30H
        OUT 82H         ; RD' = 1
        JMP LOOP
```
The LEDs show the digital output continuously. The 74LS244 buffer supplies the LED current, because an 8255 pin can supply only a very small current.

## Check yourself

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

1. With the 8255 at base 80H, what is the control register address?
   A. 80H
   B. 81H
   C. 82H
   D. 83H
   Answer: D. A1A0 = 11 gives control = 83H; ports A, B, C are 80H, 81H, 82H. (Key point: Addresses)

2. Port A input, port B output, PC upper output, PC lower input, mode 0. Control word?
   A. 91H
   B. 81H
   C. 99H
   D. 90H
   Answer: A. 1001 0001: D7=1, D4=1 (A in), D3=0, D1=0 (B out), D0=1 = 91H. (Key point: Control word)

3. How does the program detect end of conversion?
   A. Waits for INTR' (PC0) to go low
   B. Waits for WR' to go high
   C. Delays for fixed time only
   D. Reads port B
   Answer: A. ADC0804 pulls INTR' low when done; the program loops while PC0 = 1 (ANI 01H, JNZ). (Key point: EOC detection)

4. How is conversion started in ADC0804 here?
   A. Low-to-high edge at WR' (PC4)
   B. High level at RD'
   C. Reset of 8255
   D. A pulse on INTR'
   Answer: A. The program makes WR' = 0 then 1; the rising edge starts conversion. (Key point: Start conversion)

## Related in Instrumentation II

- [8-channel ADC interface with 8255 and 8085](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Aadc8-8255-problem) — Instrumentation II, chapter 4
- [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
- [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
- [ADC with 8085 using 8255: fan and heater control](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Aadc-8255-fan-heater) — Instrumentation II, chapter 4
- [Interfacing ADC0808 with 8085 using 8255A](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Aadc0808-8255-interface) — Instrumentation II, chapter 4

## Related in other subjects

- [Address decoding for 8 LEDs output port](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3Adecoder-output-port-8-leds) — Microprocessor, chapter 4
- [8085 ALP: interchange two bits of bytes](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3Aalp-8085-interchange-bits) — Microprocessor, chapter 2
- [8085 ALP: exchange bits D6 and D2](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3Aalp-8085-exchange-d6-d2) — Microprocessor, chapter 2
- [Blink 8 LEDs at port 2](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3A8051-blink-leds-port2) — Embedded System, chapter 9, asked 2×
