Past exam question: 2082 Kartik (Back), Q7
Open in the Padhaiko appQuestion
Design an address decoding circuit to interface one 4Kx8 EPROM chip and two 2Kx8 RAM chip with 8085 microprocessor.
Solution
Memory Specifications & Sizing:
- One 4K x 8 EPROM chip:
- Size = 4096 bytes = 4 KB = 2^12 bytes.
- Requires 12 address lines:
A11–A0.
- Two 2K x 8 RAM chips (RAM 1 and RAM 2):
- Size = 2048 bytes = 2 KB = 2^11 bytes each.
- Requires 11 address lines:
A10–A0each.
- Total capacity: 4 KB + 2 KB + 2 KB = 8 KB.
- Standard convention places EPROM at reset vector
0000H, followed consecutively by RAMs.
Memory Map & Address Allocation:
- EPROM (4 KB): Range =
0000Hto0FFFH0000H=0000 0000 0000 0000b0FFFH=0000 1111 1111 1111b- Lines
A11–A0connect directly to EPROM address pins.
- RAM 1 (2 KB): Range =
1000Hto17FFH1000H=0001 0000 0000 0000b17FFH=0001 0111 1111 1111b- Lines
A10–A0connect directly to RAM 1 address pins.
- RAM 2 (2 KB): Range =
1800Hto1FFFH1800H=0001 1000 0000 0000b1FFFH=0001 1111 1111 1111b- Lines
A10–A0connect directly to RAM 2 address pins.
Address Decoding Table & 74LS138 Implementation:
| Chip | Range | A15–A14 | A13 (C) | A12 (B) | A11 (A) | A10–A0 | 74LS138 Output |
|---|---|---|---|---|---|---|---|
| EPROM (1st 2K) | 0000H–07FFH | 00 | 0 | 0 | 0 | Internal to chip | Y0\_bar |
| EPROM (2nd 2K) | 0800H–0FFFH | 00 | 0 | 0 | 1 | Internal to chip | Y1\_bar |
| RAM 1 (2K) | 1000H–17FFH | 00 | 0 | 1 | 0 | Internal to chip | Y2\_bar |
| RAM 2 (2K) | 1800H–1FFFH | 00 | 0 | 1 | 1 | Internal to chip | Y3\_bar |
- Decoder Select Inputs: Connect C = A13, B = A12, A = A11.
- Decoder Enable Inputs:
G1=+5V (Vcc).G2A_bar= Connect to output of(A15 | A14)OR gate (must be 00).G2B_bar= Connect toIO/M_barof 8085 (low for memory).
- Chip Select Equations:
CS_barof EPROM =Y0_bar AND Y1_bar(using an external AND gate, active low when either output is 0).CS_barof RAM 1 =Y2_bar.CS_barof RAM 2 =Y3_bar.
Control & Data Interfacing:
RD_barconnects toOE_barof EPROM, RAM 1, and RAM 2.WR_barconnects toWE_barof RAM 1 and RAM 2.- Data lines
D7–D0connect in parallel to all three memory chips.
Answer:
The interface allocates EPROM at 0000H–0FFFH (decoded by Y0_bar AND Y1_bar), RAM 1 at 1000H–17FFH (Y2_bar), and RAM 2 at 1800H–1FFFH (Y3_bar) using a 74LS138 decoder with inputs C=A13, B=A12, A=A11 enabled by A15=A14=0 and IO/M_bar=0.