Past exam question: 2081 Chaitra (Regular), Q7
Open in the Padhaiko appQuestion
Design an address decoding circuit to interface one 2K * 8 ROM chip, one 2K * 8 RAM chip and one 4K * 8 EPROM chip with 8085 microprocessor consecutively starting from the memory location A000H.
Solution
Memory Sizing & Address Line Requirements:
- One 2K x 8 ROM chip:
- Size = 2048 bytes = 2 KB = 2^11 bytes -> Requires 11 address lines:
A10–A0.
- Size = 2048 bytes = 2 KB = 2^11 bytes -> Requires 11 address lines:
- One 2K x 8 RAM chip:
- Size = 2048 bytes = 2 KB = 2^11 bytes -> Requires 11 address lines:
A10–A0.
- Size = 2048 bytes = 2 KB = 2^11 bytes -> Requires 11 address lines:
- One 4K x 8 EPROM chip:
- Size = 4096 bytes = 4 KB = 2^12 bytes -> Requires 12 address lines:
A11–A0.
- Size = 4096 bytes = 4 KB = 2^12 bytes -> Requires 12 address lines:
- Starting Location:
A000H(placed consecutively). - Total Capacity: 2 KB + 2 KB + 4 KB = 8 KB (spanning range
A000H–BFFFH).
Consecutive Address Allocation & Memory Map:
- ROM (2 KB): Range =
A000HtoA7FFHA000H=1010 0000 0000 0000bA7FFH=1010 0111 1111 1111bA10–A0connect directly to ROM address pins.
- RAM (2 KB): Range =
A800HtoAFFFHA800H=1010 1000 0000 0000bAFFFH=1010 1111 1111 1111bA10–A0connect directly to RAM address pins.
- EPROM (4 KB): Range =
B000HtoBFFFHB000H=1011 0000 0000 0000bBFFFH=1011 1111 1111 1111bA11–A0connect directly to EPROM address pins.
Address Decoding Table & 74LS138 Implementation:
| Chip | Memory Range | A15 | A14 | A13 (C) | A12 (B) | A11 (A) | A10–A0 | Decoder Output |
|---|---|---|---|---|---|---|---|---|
| ROM (2K) | A000H–A7FFH | 1 | 0 | 1 | 0 | 0 | Internal | Y4\_bar |
| RAM (2K) | A800H–AFFFH | 1 | 0 | 1 | 0 | 1 | Internal | Y5\_bar |
| EPROM (1st 2K) | B000H–B7FFH | 1 | 0 | 1 | 1 | 0 | Internal | Y6\_bar |
| EPROM (2nd 2K) | B800H–BFFFH | 1 | 0 | 1 | 1 | 1 | Internal | Y7\_bar |
- Decoder Selection (74LS138):
- Connect select lines:
C = A13,B = A12,A = A11.
- Connect select lines:
- Decoder Enables:
G1(active high): Connect toA15(must be 1).G2A_bar(active low): Connect toA14(must be 0).G2B_bar(active low): Connect toIO/M_barof 8085 (low for memory operations).
- Chip Select Signals:
CS_barof ROM =Y4_bar.CS_barof RAM =Y5_bar.CS_barof EPROM =Y6_bar AND Y7_bar(combined using an external 2-input AND gate, active low when either output is 0).
Control Signal & Bus Interconnections:
- Address Lines: Demultiplexed
A10–A0connect in parallel to ROM, RAM, and EPROM. LineA11connects additionally to EPROM address input A11. - Data Bus: Bidirectional
D7–D0connects to all three memory chips. - Control Strobes:
RD_barconnects toOE_barof ROM, RAM, and EPROM.WR_barconnects toWE_barof RAM (ROM and EPROM have no write connection).
Answer:
The address decoding circuit maps 2K ROM to A000H–A7FFH (Y4_bar), 2K RAM to A800H–AFFFH (Y5_bar), and 4K EPROM to B000H–BFFFH (Y6_bar AND Y7_bar) using a 74LS138 decoder with select inputs C=A13, B=A12, A=A11 enabled by A15=1, A14=0, and IO/M_bar=0.