Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

External memory support at89s52

Status
Not open for further replies.

JeffreyPeter

New Member
I would like to use "24C64 - 64 Kbit Serial I2C Bus EEPROM external memory" for at89s51.. Is this EEprom supported by my Mc.

I think I have studied the 8051 can support 2^16 Kb.
Am I not still clear about it....
Thx in Advance..
 
24* series EEPROMs require an I2C serial interface. The AT89S51 does not have I2C hardware. But it does have an interface for PARALLEL memory such as the 6264 or the 28C64.

The 28* series EEPROMs are non-volatile parallel EEPROMs and do not require a back up battery. The 6264 is a volatile parallel RAM and requires a back up battery if the memory must be retained while power is switched off.

The 8051 can address up to 64KB of external code memory AND 64KB external data memory. But it must be PARALLEL memory...not serial.

Also, the address low byte is multiplexed with data on port P0. This means an external latch chip such as a 74HC573 is needed to demux the address low byte and the read/write data. Here is a schematic that illustrates how to interface the 8051 with external parallel memory. This one shows both external code and data memory chips -

**broken link removed**

If you only want external data memory and want to use the on chip code space, tie the EA pin to VDD instead.
 
Last edited:
It is LOADS easier. With external parallel data memory hooked up as shown above, you just load the memory address into DPTR, then use the "movx" instruction to read and write to the memory. It really is that easy.

Here's the code examples of how you would use external parallel memory -

Code:
;memory read

		mov	DPTR,#0x01FA		;load read address
		movx	A,@DPTR			;place memory read data in accumulator

;data read from memory is now available in the accumulator, where you can do what you wish with it


;memory write
		mov	DPTR,#0x01FA		;load write address
		mov	A,WRITEDATA		;place write data in accumulator
		movx	@DPTR,A			;write data in accumulator to memory

It really is that easy. ;)
 
Last edited:
So I will have to write my code to the eeprom or the 8051 and can I use an 28c256 as code memory?
 
Yes and yes. Just tie the WR pin high, RD pin low, and hook the OE pin to PSEN. If you're executing purely from external code memory, be sure to tie EA pin on the 8051 low as well. With EA high, code execution takes place from internal ROM until it reaches the last address, then continues execution from external memory.
 
So that means that I could just take the hex file from my compiler than burn the hex file directly to the eeprom? (btw,is there any simple eeprom programmer that I could build?)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top