Step-by-step guide to interfacing 64 KB EPROM and 128 KB RAM with the 8086 microprocessor, covering address, data, control lines, memory mapping, and chip select logic.
Key Takeaways
- A 64 KB EPROM requires two 32 KB chips arranged as even and odd banks to match 8086 byte addressing.
- The number of address lines equals log2 of the memory size, e.g. 16 lines for 64 KB and 17 lines for 128 KB.
- EPROM is read-only so it needs only a read control signal, while RAM needs both read and write control signals.
- Correct memory mapping and chip select decoding (using A0, BHE, and unused address lines) are the core of 8086 memory interfacing.
What the video covers
- Problem setup: design an 8086 system in minimum mode at 8 MHz with 64 KB EPROM built from two 32 KB chips and 128 KB RAM built from two 64 KB chips.
- The four things to determine for any memory interface: address lines, data lines, control lines, and chip select logic.
- 8086 memory is organized in pairs: one chip holds even addresses (lower byte, A0=0) and another holds odd addresses (higher byte, A0=1).
- EPROM needs 16 address lines for 64 KB and 8 data lines; only the memory read control signal is required.
- RAM needs 17 address lines for 128 KB and 8 data lines; both memory read and memory write control signals are required.
- Memory mapping rule: RAM starts at 00000H, while ROM/EPROM ends at FFFFFH because the 8086 begins execution at FFFF0H after reset.
- Starting and ending addresses are derived by holding unused high-order address lines fixed and varying the address lines that span the memory size.
- Chip select is generated using A0, BHE, and the unused high-order address lines, typically decoded with a 3-to-8 decoder and NAND/inverter logic.
- The memory-read and memory-write signals are combined with the chip-select outputs to enable each of the four memory chips correctly.
Chapters
- 00:00Introduction and Problem Statement
- 01:12Identifying Chips Required for EPROM and Even/Odd Banking
- 03:38Address, Data, and Control Lines for EPROM
- 05:33Address, Data, and Control Lines for RAM
- 07:52Memory Mapping and Starting/Ending Addresses
- 10:40Even/Odd Bank Selection Using A0 and BHE
- 14:16Chip Select Logic Using Decoder and Gates
- 17:44Connection Diagram and Final Summary
Full Transcript — Download SRT & Markdown
Speaker A
welcome to engineering funda family this video is a part of microprocessor 8086 video lecture series and in this video i'll be going to explain you memory interfacing with 8086 my dear students i know students are telling me many times
Speaker A
sir this is the most difficult topic but let me tell you one thing once you see this video this is just ice on the cake you just see this video till last i can give you guarantee that you will be having exact idea about how
Speaker A
to interface memory with eight zero eight six let us try to understand this step by step so my dear students here question is to design following system with eight zero eight six microprocessor here eight zero eight six is working
Speaker A
with minimum mode and frequency is eight megahertz and we are delivered to interface 64 kb of eprom using 32 kb of ep rom and we are delivered to interface 128 kb of ram using a chip of 64 kb of ram
Speaker A
now my dear students before i explain you how to interface this you should know how many things that you will have to learn see to interface this memory you should know how many different categories of lines that we need to interface
Speaker A
see first of all you should know how many address lines are there secondly you should know how many data lines are there then you should know how many control lines are there and then you should know how to do chip select
Speaker A
once you know these four operations you can easily interface this memory now i'll explain you how to identify all these answers so first of all you should know my dear students how many chips are required so let us
Speaker A
talk about ep rom first so my dear students here we are live to have 64 kb of ep rom using the chip of 32 kb of ep rom so obviously how many chips that you need to have two chips two chips of 32 kb of ep rom
Speaker A
will make 64 kb of ep rom dear students one more thing that you should know with 8086 we are having even an odd addressing so one chip will be having even address and second chip will be having odd
Speaker A
address that you must know right with 8086 memory interfacing one chip will be there with even address and second chip will be there with odd address right now let us try to understand how many data lines are there and address lines
Speaker A
are there for address lines of 64 kb of ep rom how many addresses will be there s per k 2 to the power 10 and 64 is having 2 to the power 6 so in total 2 to the power 16 so you can
Speaker A
say total 16 address lines are there so to have 64 kb of ep rom you should have 16 address lines and this is 64 kb b means byte so for byte you should have eight data lines right and my dear students for ep rom it is
Speaker A
erasable programmable rom you need to have memory read control signal only so you see three answers that we have already got address lines data lines and control lines right now let us calculate this for 128 kb of ram using 64 kb off ram
Speaker A
so 128 kb of ram that you need to have by having 64 kb of ram so how many chips that you need to have two chips of 64 kb of ram will make it to 128 kb of ram here also my dear
Speaker A
students you should know one chip is there for even address and second chip will be there for odd address with 8086 memory interfacing always there will be pair of chips of memory one chip will be there with even address and
Speaker A
second chip will be there with odd address how to have it that and i'll explain you don't worry about that it is very easy you just need to see this video till last let us calculate address lines again
Speaker A
so address lines for 128 kb you see with k 2 to the power 10 and 128 means 2 to the power 7 so in total 2 to the power 17 means how many address lines are required 17 address lines are required
Speaker A
right for data line here you have kb you see byte is there with byte how much data lines are there eight so eight data lines are there right now my dear students control lines with ram that you should know ram is random
Speaker A
access memory so memory read as well as memory write both are required as a control signals right now my dear students let us try to understand the heart of this video that is chip select and for that you will have to do memory
Speaker A
mapping now see in memory mapping how many chips are there you just mention it over here first how many chips are there two chips of 32 kb of eprom and two chips of 64 kb of ram so you see here i have
Speaker A
mentioned two chips of ep rom two chips of ram now whenever you interface memory with eight zero eight six remember this you will be writing lower byte of epirom higher byte of ep rom lower byte of ram higher byte of ram
Speaker A
like this or you can write it in this way ep rom of even address ep rom of odd address ram of even address ram of odd address you can prefer any of this name right the reason is there are some basics that you must know
Speaker A
that's why i'm telling you see lower byte that you can mention then higher bit or you can mention it in this way even address an odd address right so i have mentioned it like lower byte higher byte lower byte higher byte
Speaker A
now you see here i have written ep rom and here i am having ram now my dear students there are few basic things that you should know [Music] see this ram that is starting from 0 0 0 0 hex location
Speaker A
always remember this ram will always starts from 0 0 0 0 0 hex location so whenever you interface memory and in different types of memory ram is given then you will have to interface ram starts from zero zero zero zero hex
Speaker A
location and read-only memory that should have ending address that will be fff why the reason is when you restart 8086 at that time it will be having initiation with ffff0 location and it should be there with rom that's why rom will be there with final
Speaker A
address ffff hex so you see here i'm having ep rom so i'm considering final address of ep rom that is fff an initial address of ram that will be 0 000 hex so this is one thing that you should
Speaker A
know so whenever you have memory interfacing roms last address that you need to write first that is all f and rams first address that you need to write that is all 0 right now my dear students you will have to
Speaker A
see what is the size so you see if you talk about ep rom then with ep rom how many address lines are there 16 so as if you want to write starting address of ep rom what has to be that
Speaker A
starting address in its starting address from ending address how many lines are there 16 so a0 to a15 total 16 lines that will change from all 0 to all 1 right so here a 0 to a 15 that will be there
Speaker A
with change the data and this a19 18 817 and a16 that will remain as it is so you see now starting address of ep rom that i have identified as per size of address lines so that is this four lines are as it is a 0 to a 15
Speaker A
that we are storing inside right so here i'll be mentioning that as per all zeros over here and that will gives you 1 1 1 1 means f and then after all 0s are there means f 0 0 0 0 hex that is my
Speaker A
starting address now similarly with ram what will be my ending address so you see with ram we have 17 address lines right so a0 to a16 that will changes to all ones so you see this first three bits that is 0 and
Speaker A
a0 to a16 that is getting changed from 0 to 1 so that is my last address of ram 2 right that that gives you 1 you see 0 0 0 1 so that is 1 and then all f hacks are there right so that is
Speaker A
how starting an ending address that we can identify now very interesting thing that is coming in front of you my dear students you see this ep rom that is having even address or you can say lower byte so even address is having a 0 is equals
Speaker A
to 0 right an odd address which is there with eb rom 2 or you can say higher byte memory so that is having a 0 that will be always 1 right so here see this a0 that should be
Speaker A
your focus right with all memories so with lower byte or you can say with even address memory a0 will be 0 you can directly understand even means what a 0 should be 0 right and odd means what a 0 should have 1
Speaker A
so higher byte is having odd address lower byte is having e1 address you see over here also you will have to substitute 0 for lower byte and 1 4 higher byte right so that is how you just define
Speaker A
a0 now it is very simple my dear students ending address of ep rom in that these four ones are as it is and then all zero that will get changes to all one so this will be ffffe hex which is last address of ep
Speaker A
rom one and similarly with ep rom 2 here next you will be having 1 over here and this should be 0's it should start from f triple 0 1 2 it will end up to ffff similarly over here you see
Speaker A
we are having a 0 to a 16 location which is there with ram 1 so you see this is 0 with e1 address now a1 to a16 that should changes from 0 to 1 right so here ram 1 that is having 1 ff e that is
Speaker A
my location and now ram 2 is having starting location that will be as per you see now these all are 0 right so that will be starting from 0 0 0 0 0 1 hex so that is how starting an ending
Speaker A
address that we can identify and to have chip select you should see unused line so with this ep rom this a16 a17 a18 and a19 are unused and for ram a17 a18 and a19 that is unused you see
Speaker A
right now what we will be doing is we will be giving active low chip select so ep rom 1 and ep rom 2 that will be having this a16 to a19 line that is 1 so that we will be directly giving it to
Speaker A
nand gate and ram is having a 17 18 a 19 that is zero so after inversion we will give it to nand gate you see how do we provide memory interfacing and here chip select is very essential right other things are very easy
Speaker A
and you see here minimum mode that i have shown you should know my dear students minimum mode of 8086 by using minimum mode we can have a 0 to a 19 address lines and d0 to d15 data lines and bus high enable
Speaker A
these are the terminals that we will be using for address and data and here you should know control signals that will be using as memory read and memory right now let us try to understand chip select so here
Speaker A
with ep rom i have told you a16 a17 a18 and a19 those are constant those are one so directly i'm giving it to nand gate and for ram we've been having a 17 a 18 a 19 those are zero so after bubble i am
Speaker A
giving it to nand gate now my dear students you should know here we are having two ep rom chip and here we are having two ram chip one ram chip and one ep rom chip acquires e1 addressing and second
Speaker A
acquires odd addressing right so for that you should know see even select will happen when a 0 is equals to 0 and odd will get selected when bus high enable that is equals to 0.
Speaker A
so here after or gate i am providing even select and here this after r gate i am providing it with bus high enable so this terminal that will select odd ic address and this terminal that will select even
Speaker A
address of ic right even address of ic is having data from d0 to d7 and all address ic is having data from d8 to d15 now my dear students we have this even an odd select for ep rom
Speaker A
similarly we can have it for ram right so you see this unused line and a0 bhe that is generating our chip select now my dear students let us have ics here i am showing you ep rom with e1 ic ep rom with odd ic and here
Speaker A
we are having ram with e1 ic and ram with odd ic my dear students first of all you should know how to connect chip select so even that i need to connect it from here with chip select and this odd that i
Speaker A
need to connect it with chip select over here e1 will be connected with chip select and r will be connected with chip select now my dear students you should know control signals so ep rom is having only memory read
Speaker A
that we need to connect it with output enable bar o e bar output enable bar so by having this we can have memory read operation so you see output enable is connected with memory read right here also with ram we have output enable
Speaker A
for memory read but with ram we have memory write also so here i have connected memory write this is what we are generating by having this 3 cross 8 decoder right now my dear students let us try to understand how address
Speaker A
lines are there so i have already told you with ep rom how many address lines are there 16 a 0 to a 15 those address lines are there and with ram how many address lines were there 17 a 0 to a 16 we have
Speaker A
already calculated that that i am connecting it over here now my dear students for data with ep rom of e1 we will be connecting d0 to d7 data and with odd will be connecting d8 to d15 data so this is complete memory
Speaker A
interfacing with 8086 so this is all about memory interfacing my dear students here only few things that you need to know even an odd addressing right even memory that will get selected by a 0 is equals to 0 or will get selected by
Speaker A
bhe bar that's it right and few basic changes that you need to see in memory mapping and still if any confusion is there what i want is you just post that in comment box so that we can have proper
Speaker A
discussion thank you so much for watching this video
Topics:8086memory interfacingEPROMRAMchip selectmemory mappingmicroprocessoraddress lineseven and odd bank3-to-8 decoder











