Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] 8051 memory map / decoding

Status
Not open for further replies.

czpir

Member level 3
Joined
Apr 18, 2002
Messages
61
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
581
8051 memory map

Warm Greetings

I want to connect an external ROM (FLASH / EEPROM), RAM and I/O device to a 8051 (ROMLESS).

Can some one help me with the memory mapping using 74138 ?

I would appreciate any info on understanding and doing this for different sizes of ROM, RAM and I/O on the 64 K address spaces of the 8051.

TIA and Rgds.
 

memory mapping in 8051

I did go through the above sites, but I would like to understand more on this and create a simple schematic on how to wire the 8051, 74138, RAM, ROM and I/O.

I would also like to know how to draw up the memory map as to the address space in which the ROM is mapped, RAM, I/O etc.


TIA
 

memory mapped io 8051

OK continue looking here:

https://www.8052.it/download.htm

Especially the book "the final word on the 8051" might be interesting for you.

You should invest a few hours, maybe you will see things mode clearly then :)

have fun reading
 

8051 microcontroller memory map

hai,

its easy one.


74138


take a15,a14,a15 and connect to 138
and ALE

we get _cs slecect signal range from 0x8000 to 0xffff

connect one cs to ram.
 

8051 memory mapping

>>> 8051 (ROMless)...

=> Instead of 8051, it should be called "8031" !!!
 

how to draw memory map

C-Man

I did download the "Final Word On The 8051", but this does not detail the use of the 74138. I am actually looking for help on what should be connected where and where the devices would exist on the memory map. That too if I decide to use 64K RAM, 64K ROM and 32 bytes I/O.

Senthil

I would appreciate if you let me know more on this .

jo2moon

I am actually going to use a 8052 and ignore the internal ROM.

TIA
 

8051 74138

OK the 74138 is a 3 -> 8 decoder
**broken link removed**

When you look at the datasheet you should see its function easily:

One of the 8 outputs O0 to O7 is low corresponding to the 3 inputs A0 to A2 while E1, E2 and E3 have their desired states.

So if you use an 8051 and connect for example A13, A14, A15 to A0, A1, A2 of the 74138 and connect E1 and E2 to GND and E3 to +5V (also on the 74138) you should get the following adress ranges useing O0 to O7 as CS for your external devices:

O0 L from 0x0000 to 0x1FFF
O1 L from 0x2000 to 0x3FFF
O2 L from 0x4000 to 0x5FFF
O3 L from 0x6000 to 0x7FFF
O4 L from 0x8000 to 0x9FFF
O5 L from 0xA000 to 0xBFFF
O6 L from 0xC000 to 0xDFFF
O7 L from 0xE000 to 0xFFFF

Just a short note on the 8051 the code and dataspace are separated, to seperate them using everything "external" you also need to use the RD and WR pins but this is another story which you should find in "the final word" ...

Hope this helps
 

8052 memory map

Wow C Man you have hit me now

I am also fully into the "Final Word..." and have the following doubts now

The 74138 would provide chip selects for the following ranges

O0 L from 0x0000 to 0x1FFF
O1 L from 0x2000 to 0x3FFF
O2 L from 0x4000 to 0x5FFF
O3 L from 0x6000 to 0x7FFF
O4 L from 0x8000 to 0x9FFF
O5 L from 0xA000 to 0xBFFF
O6 L from 0xC000 to 0xDFFF
O7 L from 0xE000 to 0xFFFF

But I observe that these are all 8192 (8K) spaces only, so a single ROM or RAM device greater than 8K can not used with these chip selects.

Am I right here ? I understand from the "Final word.." that 64 K of ROM can be used from 0x0000 to 0xFFFF using the 8051 ALE as the chip select, but if I also want to use a 64K RAM then how could I derive the chip select ? Can I use the the RD or WR for this ?

I could add the I/O using the 74138 as I need only a few addresses.
TIA
 

how to draw a memory map

For useing a 64 KRam you would have to use an and gate which is connected to RD and WR so if either RD or WR ist L the output gets L :)

I have used a 74139 in the past which is 2 seperate 2 to 4 decoders similiar to the 74138 and gave me a little bit more flexibility in decoding for my Ram, Rom and peripherals.

I am also afraid if you really need 64K ram and 64K rom for your application the 8051 maybe not the right processor to do this, but this is again just my personal opinion.

You could also use a Philips 89C51RD2 processor which already has 64K codespace internal so you would not need an external EEPROM or Flash for your program, but if you need an external ram this does not simplify your hardware very much.

If you need bigger adress segments than 8k with the described 74138 simply connect only A15 (will give 2 32K segments) or A15 and A14 (will give 4 16K segments).

hope this helps
 

decode external sram 8051

C Man,

The "Final Word..." was a great reference. Many things make sense to me now along with the valuable tips you have given me.

You are right about the choice of the 8051, but I would be changing to a 8051 based SoC after some time. Till then I would be using exernal RAM and ROM.

Thanks for now
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top