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.

Interfacing of 8051 with EEPROM

Status
Not open for further replies.

engg.embedded

Junior Member level 1
Joined
Oct 4, 2008
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,411
eeprom interfacing with 8051

Hi...

Please help me with the interfacing of 8051 with EEProm memory.
I have been trying to work on it since last 4-5 weeks, bt no luck as such... :cry:
I am uploading the code with the ckt diagram. Please tell me where the problem is????

regards,
engg.embedded
 

2404 with 8051

I´m not familiar with the 8051 asswmbly but it seems that youre writing a 1 to the output when SDA or SCl is 1. Howevwe, in I2C you´ll never have to write a 1, just have to left the pin floating. The pull-up resistors will write a 1 for you.
 

interfacing 8051 with several 2404

@ pauloynski,

Thanks for the reply. But sorry i didnt get ur point. You are talking from the hardware or the software side?
Where am i writing 1??? Could you please give a more eloborate answer.

regards,
engg.embedded
 

eeprom interfacing 8051

Excus my bad english. First of all I have a problem with your schematic. 8051 microcontrollers do not have floating pins like AVR or PIC. What are you doing with that filters R1-C1 and R2-C2? You do not need them. Erase them. When you initializing the microcontroller set both SCL and SDA to 1. In your program I do not see any delay. EEPROMs works with 400kHz clock signal. You need to read again the datasheet. Not to say you do not send the adress of the device. You will have to rewrite your program. Is completly wrong. If you make a search for 8051 on google you will find a lot of example for use 8051 with 24cxx.
 

eeprom interfacing in 8051 microcontroller

i used R1-C1 and R2-C2 because something like that was given in the datasheet of 2404. i didnt use it before but since output was not right so thought of using the C1 and C2 capacitors.
In the beginning of the program i have initialized SDA and SCL to 1.
And for the address, i have sent it as 0xa0.

regards,
engg.embedded
 

8051 eeprom program

SDA = 1 and SCL = 1 in your firmware means that the corresponding pin ports in hardware should be in 3state as needed by the I2C protocol. And I suppose your output pins are 3state capable. Also, remove C1 and C2 . The maximum allowable capacitance in an I2C line (including cable and devices) is only 400pF. You never need to add capacitance to an I2C line when using conventional devices. Also check your pulse´s width. Maximum allowable frequency is 100kHz or 400kHz depending on the device capability.

Added after 16 minutes:

Also your pull-up resistors are too low, they need to be in the range 1k5 to 4k7 according to the I2C definition.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top