Past exam question: 2082 Chaitra (Regular), Q8
Open in the Padhaiko appQuestion
Design an address decoding circuit to interface two 1K EPROM and one 2K RAM consecutively using 3 to 8 decoder starting memory location 1000H.
Solution
Memory Capacity & Address Line Requirements:
- Two 1K EPROM chips (EPROM 1 and EPROM 2):
- Capacity per chip = 1024 bytes = 1 KB = 2^10 bytes.
- Requires 10 internal address lines:
A9–A0.
- One 2K RAM chip:
- Capacity = 2048 bytes = 2 KB = 2^11 bytes.
- Requires 11 internal address lines:
A10–A0.
- Starting address:
1000H(consecutively placed). - Total memory capacity: 1 KB + 1 KB + 2 KB = 4 KB (occupying range
1000H–1FFFH).
Address Allocation & Memory Map:
- EPROM 1 (1 KB): Range =
1000Hto13FFH1000H=0001 0000 0000 0000b13FFH=0001 0011 1111 1111b
- EPROM 2 (1 KB): Range =
1400Hto17FFH1400H=0001 0100 0000 0000b17FFH=0001 0111 1111 1111b
- RAM (2 KB): Range =
1800Hto1FFFH1800H=0001 1000 0000 0000b1FFFH=0001 1111 1111 1111b
Decoding Table & 74LS138 Connection Logic:
| Chip | Range | A15–A13 | A12 (C) | A11 (B) | A10 (A) | A9–A0 | 74LS138 Output |
|---|---|---|---|---|---|---|---|
| EPROM 1 (1K) | 1000H–13FFH | 000 | 1 | 0 | 0 | Address to chip | Y4\_bar |
| EPROM 2 (1K) | 1400H–17FFH | 000 | 1 | 0 | 1 | Address to chip | Y5\_bar |
| RAM (1st 1K) | 1800H–1BFFH | 000 | 1 | 1 | 0 | Address to chip | Y6\_bar |
| RAM (2nd 1K) | 1C00H–1FFFH | 000 | 1 | 1 | 1 | Address to chip | Y7\_bar |
- 74LS138 Select Inputs: Connect C = A12, B = A11, A = A10.
- 74LS138 Enable Inputs:
- Active-high
G1: Connect to+5V (Vcc). - Active-low
G2A_bar: Connect to output of an OR gate combining(A15 | A14 | A13). - Active-low
G2B_bar: Connect toIO/M_barof 8085 (low for memory operations).
- Active-high
- Chip Select Signals:
CS_barof EPROM 1 =Y4_bar.CS_barof EPROM 2 =Y5_bar.CS_barof RAM =Y6_bar AND Y7_bar(using an external active-low AND gate, output goes LOW when either Y6\_bar or Y7\_bar is LOW).
Control and Bus Interconnections:
- Address Lines:
- 8085 demultiplexed
A9–A0connect in parallel to address inputs of EPROM 1, EPROM 2, and RAM. - Line
A10connects additionally to address input A10 of RAM.
- 8085 demultiplexed
- Data Bus:
D7–D0connects to data pins of all memory devices. - Control Signals:
RD_barconnects toOE_barof EPROM 1, EPROM 2, and RAM.WR_barconnects toWE_barof RAM (EPROMs are read-only; WE\_bar not connected or tied high).
Answer:
The address decoding circuit maps EPROM 1 to 1000H–13FFH (Y4_bar), EPROM 2 to 1400H–17FFH (Y5_bar), and RAM to 1800H–1FFFH (Y6_bar AND Y7_bar) using a 74LS138 decoder enabled by A15=A14=A13=0 and IO/M_bar=0, with select inputs C=A12, B=A11, A=A10.