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] Problem with reading data from AT24C02

Status
Not open for further replies.

g_shyam1682

Full Member level 4
Joined
Jan 11, 2010
Messages
204
Helped
53
Reputation
106
Reaction score
43
Trophy points
1,308
Location
Udaipur-Rajshan-India
Activity points
2,538
Hello friends

I have one microcontroller AT89S52 and EEPROM AT24C02.

I write one simple program which write and read data to EEPROM

when i used blank EEPROM , it work properly

but when i used another EEPROM(with SOME data), which is used by other program(third party program)

then My program write data properly but not read properly


My problem is

1]what is that SOME data, which affect my reading process
2] Is it any kind of security data of third party program

when i erase that EEPROM(with SOME data) completely

then after it will work properly

please help me to find problem

Thanks in advance and also for reading this long description
 

hi g_shyam1682
pls i am also working on a project that writes and reads from a 89s52. pls i will appreciate it if u will send me your code for reading and for writing. and your circuit diagram. that's my final yr project.
 

Hi Friend

If it is your final year project, then do it as project.
and don't expect to ready made code.

first start your project with yourself.
google internet, there is number off circuit diagram for AT24c02.
and also number off sample code for interfacing.

Then if you are in trouble, then ask me.
i will definitely help you.

Best of Luck
Shayam
 

post your code, maybe it's too fast... I2C clock speed <= 100kHz
 

Re: Problem with reading data from AT24C04

Hi,

Again there is reading problem with I2C EEPROM. This time Micro is P89v51RD2 and EEPROM is AT24C04. Data writing is Ok but data reading from EEPROM is problem.

Whenever we read data from random address location, some time data comes true and some times doesn't.

Please help me solve out my problem.
Thanks in advance.
 

Hi,
How many bytes are you trying to write and read and what mode are you using
AT24C04 has page read/write mode and random register read/write mode
if you are using page read/write mode, then at the end of each page, it will roll over to page start and you will experience some corrupted data.

as Kurenai_ryu said, post you code. It will be easier for others to find problems then.
 

Hi,

Thanks for reply.
In data write process, there is page write mode and end of each page counter roll over to page start.
but in data reading process, there is no limit for page read mode, means counter only roll over at the end address of eeprom to start address of eeprom (0 -> 255 -> 0).

And this all are calculated and control in my application layer, So i am confident that there is not any roll over problem.

One other thing, i want to know that,
Is there any delay required between stop condition(one data reading complete) to start condition (second data reading start ) in EEPROM?
And if required, then how much required?
 

4.7K pullup resistors on data & clock lines of the eeprom.
GUARANTEED that is the problem if you are sure code is good.
 

When I started using 24Cxx 15 years ago, I studied carefully the required delays between the data and clock edges also between the stop and start conditions. Obviously, I got them from the appropriate datasheet. Also, since the MCU crystal frequency could be changed, I adjust the SEEP write/read routines accordingly.
 

Hi,

Thanks all of you to reply to my problem.
Now, my problem is solved. Actually my problem is with reading of data from EEPROM which is i mention in my earlier post. And also reading is sometimes successful and sometimes not. My doubt is that the address counter is not work properly or not load properly.
Solution : Whenever i start read data from EEPROM, I load address counter with address of location from which i want to read data, and at the end of all data read, i reload address counter with 0xFF. So next time address counter work properly with new address location.

Regards,
Ghanshyam - 07891231301.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top