- 2068 Baisakh (old course) · 10 marks
8086 RAM/EPROM interfacing with reset address
Short answer
Two 8K RAM chips (16 KB) are placed at 00000H–03FFFH and two 4K EPROM chips (8 KB) at FE000H–FFFFFH to include reset address FFFF0H. Address lines A1–A13 for RAM, A1–A12 for EPROM; A0 and BHE select even/odd banks. A decoder with M/IO high selects EPROM when A19–A13=1111111 and RAM when A19–A14=000000.
Interface two 8K RAM chips and two 4K EPROM chips with 8086 so as to form a completely working system configuration. We know that, after reset, 8086 starts from address FFFF0H. Select the starting address of EPROM such that this address (FFFF0H) lies in it. The RAM address must start at 00000H.
The 8086 has a 16-bit data bus, so memory is built as two banks: an even bank (D0-D7, selected by A0 = 0) and an odd bank (D8-D15, selected by BHE' = 0). Each bank has one RAM and one EPROM chip.
Address map
- EPROM: two 4K chips = 8 KB. It must contain FFFF0H, so it is placed at the top: FE000H-FFFFFH. Each chip needs 12 lines (A1-A12). Select when A19-A13 = 1111111.
- RAM: two 8K chips = 16 KB at 00000H-03FFFH. Each chip needs 13 lines (A1-A13). Select when A19-A14 = 000000.
| Memory | A19..A14 | A13 | Range |
|---|---|---|---|
| RAM 2 x 8K | 000000 | x | 00000H-03FFFH |
| EPROM 2 x 4K | 111111 | 1 | FE000H-FFFFFH |
(Check: 03FFFH - 00000H + 1 = 16384 bytes; FFFFFH - FE000H + 1 = 8192 bytes.)
Chip connections
| Chip | Address pins | Bank select |
|---|---|---|
| RAM even | A1-A13 | A0 = 0 |
| RAM odd | A1-A13 | BHE' = 0 |
| EPROM even | A1-A12 | A0 = 0 |
| EPROM odd | A1-A12 | BHE' = 0 |
Circuit
8086 (min mode) 74LS373 x3 (ALE)
AD0-AD15, A16-A19 -> latches -> A0..A19, BHE'
ALE -> G of latches DEN'/DT-R' -> 74LS245 (data)
RAMSEL' = OR(A19,A18,A17,A16,A15,A14, M/IO'(inverted))
ROMSEL' = NAND(A19..A13) with M/IO = 1
RAMSEL' + A0 -> CS' of RAM even (A0=0)
RAMSEL' + BHE' -> CS' of RAM odd
ROMSEL' + A0 -> CS' of EPROM even
ROMSEL' + BHE' -> CS' of EPROM odd
RD' -> OE' of RAM and EPROM WR' -> WE' of RAM
D0-D7 -> even chips, D8-D15 -> odd chips
After reset the 8086 starts at CS:IP = FFFF:0000 = FFFF0H, which lies inside the EPROM (FE000H-FFFFFH), where a JMP to the main program is placed. A word access at an even address enables both banks; a byte access enables only one bank.
✓ Answer checked by Claude Sonnet 5.5
Related questions
- Interfacing: 512-byte RAM with 8085 · Instrumentation II, chapter 2
- DMA concept; ROM/RAM interface at 4000H · Instrumentation II, chapter 1
- USB interface chips: device vs host · Instrumentation II, chapter 3
- USB enumeration; device vs host interface chips · Instrumentation II, chapter 3
- 8-channel ADC interface with 8255 and 8085 · Instrumentation II, chapter 4
- PCI bus; 8255 printer interface at 5500H · Instrumentation II, chapter 2
- 74LS138 interfacing of ROM, RAM, EPROM · Microprocessor, chapter 4
- Interface 4 KB EPROM and two 2 KB RAM · Microprocessor, chapter 4
- Interface two 8K x 8 ROM at 4000H · Microprocessor, chapter 4
- Interfacing 2732 EPROM and 6116 RAM · Microprocessor, chapter 4