---
title: "Interfacing: 512-byte RAM with 8085"
subject: "Instrumentation II"
chapter: 2
key: "semester_5/instrumentation_ii:rag-ram-512-interface"
source: https://www.bctengineer.com/q/semester_5/instrumentation_ii/rag-ram-512-interface
site: BCT Engineering
---

# Interfacing: 512-byte RAM with 8085

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

- Asked in: 2075 Asoj, 1+3 marks
- Video: [Interface 4Kbyte EPROM with starting address 0000H with 8085. | Interface in 3 steps | unit 3](https://www.youtube.com/watch?v=xRQ_9yj6N5I) — Jay Explains
- Answer checked by Claude Sonnet 5.5 on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/instrumentation_ii/rag-ram-512-interface
- Whole chapter: https://www.bctengineer.com/md/semester_5/instrumentation_ii/chapter-2

## Question

What do you mean by interfacing? A RAM chip of 512 bytes is given for interfacing with 8085 microprocessor system. Design an address decoding hardware for the same.

## Short answer

Interfacing connects a memory chip to CPU buses with address decoding. A 512-byte RAM needs A0–A8; A15–A9 are decoded for chip select. Place it at 0000H–01FFH using an 8-input OR or 74LS138 decoder so CS' activates only for that range with IO/M low.

## Answer

**Interfacing** means connecting a memory or I/O device to the microprocessor buses (address, data, control) with the necessary decoding and buffering logic, so that the processor can access the device at a defined address and with proper timing.

#### Design: 512 x 8 RAM with 8085
A 512-byte chip needs 9 address lines (2^9 = 512), A0-A8. The remaining lines A15-A9 (7 lines) are decoded for chip select. Assume the RAM is placed at **0000H-01FFH**.

| A15-A9 | A8-A0 | Range |
|---|---|---|
| 0000 000 | 0 0000 0000 to 1 1111 1111 | 0000H-01FFH |

```text
 A15 A14 A13 A12 A11 A10 A9 ---+
 IO/M --------------------------+--[ 8-input OR ]--> CS' of RAM
 A8..A0 ---------------------------------> A8..A0 of RAM
 RD' -> OE'      WR' -> WE'
 AD0-AD7 -> 74LS373 (ALE) -> A0-A7      D0-D7 <-> AD0-AD7 data
```
CS' is active low. The output of an OR gate is low only when all its inputs are low, so CS' is low only when A15-A9 = 0 and IO/M = 0 (memory cycle). An equivalent circuit is a 7-input NOR of A15-A9 (output 1 when all are 0) followed by a NAND with the inverted IO/M.

With a 74LS138: connect A11, A10, A9 to the select inputs C, B, A, and enable the decoder with G1 = NOR(A15, A14, A13, A12), G2A' = IO/M and G2B' = 0. Output Y0' is then the chip select for 0000H-01FFH (Y1' for 0200H-03FFH, and so on).

This is full decoding, so the RAM responds only to 0000H-01FFH. During a read, RD' enables the RAM output; during a write, WR' writes the data on D0-D7.

## Check yourself

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

1. What does interfacing mean here?
   A. Writing a program for the memory
   B. Connecting a device to the address, data and control buses with decoding so the CPU can access it at a defined address
   C. Increasing the clock speed
   D. Replacing the CPU
   Answer: B. Interfacing is connecting the device through decoding/buffering logic for a defined address and proper timing. (Key point: Meaning of interfacing)

2. How many address lines does a 512-byte chip need?
   A. 8
   B. 9
   C. 10
   D. 11
   Answer: B. 2^9 = 512, so A0-A8 go to the chip. (Key point: Address lines)

3. Which lines are decoded for chip select for 512 bytes at 0000H-01FFH?
   A. A15-A9 (7 lines)
   B. A15-A8
   C. A15-A10
   D. A7-A0
   Answer: A. The remaining 7 lines A15-A9 must be 0, together with IO/M' = 0 for memory. (Key point: Decoded lines)

4. When is CS' of the RAM low?
   A. A15-A9 = 0 and IO/M' = 0
   B. A15-A9 = 1 and IO/M' = 1
   C. Whenever RD' is low
   D. Only when ALE is high
   Answer: A. The decoder needs A15-A9 = 0 and a memory cycle (IO/M' = 0). (Key point: CS condition)

## Related in Instrumentation II

- [8086 RAM/EPROM interfacing with reset address](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Arom-ram-8086-fffffh) — Instrumentation II, chapter 1
- [Full vs partial address decoding for memory](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Afull-vs-partial-decoding) — Instrumentation II, chapter 2
- [Interfacing 8-channel 8-bit ADC with 8085](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Aadc0808-8channel) — 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
- [Unique vs non-unique address decoding](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Aunique-vs-nonunique-decoding) — Instrumentation II, chapter 2
- [Interfacing 10-bit DAC with 8085](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Adac10-8085) — Instrumentation II, chapter 4, asked 2×

## Related in other subjects

- [Address decoding for two 8 KB RAM at C000H](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3Adecoder-two-8kb-ram-c000h) — Microprocessor, chapter 4
- [74LS138 interfacing of ROM, RAM, EPROM](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3Adecoder-74ls138-rom-ram-eprom) — 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: divide two bytes](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3Aalp-8085-divide-bytes) — Microprocessor, chapter 2
