Skip to main content

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.
MemoryA19..A14A13Range
RAM 2 x 8K000000x00000H-03FFFH
EPROM 2 x 4K1111111FE000H-FFFFFH

(Check: 03FFFH - 00000H + 1 = 16384 bytes; FFFFFH - FE000H + 1 = 8192 bytes.)

Chip connections

ChipAddress pinsBank select
RAM evenA1-A13A0 = 0
RAM oddA1-A13BHE' = 0
EPROM evenA1-A12A0 = 0
EPROM oddA1-A12BHE' = 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

All Instrumentation II chapter 1 questions →