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.

eeprom 24C64 read problem

Status
Not open for further replies.
can you message me your program?? i will see for any possible error in my code and then the last thing is to change the eeprom..
 
You may be right about the eeprom being faulty...... However I usually receive 0xFF when I do a read from a faulty piece of code...

Can you read the eepom directly from the programmer and use a hex file reader to see if the correct data is in the eeprom..

The other thing you may try is to lengthen the write delay.... I have it at 5ms... check the datasheet of your 24c64... It may be a lot slower. Mine is a 400khz device.

If you increase this delay to at lest 20ms and place two more nop()'s in the clock (clock stretching), it may help you..
 
hahahahhahahah... ;) :D

sire, my eeporm is WORKING now. Actually the PROBLEM was that the copper trace near the 8th pin was slightly uprooted and hence my eeprom was not geeting Vcc. :p

so i thought to check the connections and saw the fault and immediately corrected it.. :)

now i wrote data into the eeprom and switched the suply off and when i read, it gave correct data.. :rolleyes:

i am sooooo happy... thanks a lot sir for helping this much...
 
Last edited:
sir last thing that now comes to my mind is that can we erase the eeprom data externally or i would have to write all zeros in it to mark as empty??
 
actually, i was asking that because now when i am saving any data, it always read back some data from previous saves...
like first i saved 111111
and it read it correctly
now i saved 444444
and it is showing 144444

the reading and writing both starts from i=0, but still it is doing same...
 
sir i checked it and thought to display each saved data and found that it just saves the value for i=0, after that it (dunno how) comes out of the loop. so it saves just one char .
sorry the output i told above is as follows.

first save 000000
first read 000000

second save 140412
second read 100000

this is my code (for saving date)

void access_sys()
{
lcd_dataa("DATE: ");

col1=col2=col3=col4=1;
row2=row3=row4=0;
while(col1==1 && col2==1 && col3==1 && col4==1);
for(i=0;i<6;i++)
{
lcd_command(0x86+i);
keypad(); // get date
}
////date taking complete

////saving date
lcd_command(0x01);
lcd_ini();
delay(2000);
for(i=0;i<6;i++)
{
ak=date;
Write(ak,i);
lcd_data(ak); //here i thought to insert this to check on lcd whether
//it is saving each value or not and found that it just
//saves the first value and comes of this loop
delay(1000);
}
/////date saving complete

//rest part of program
}
 
since the loop is not working, i have thought of another alternative:

ak=date[0];
delay(100);
Write(ak,0);

ak=date[1];
delay(100);
Write(ak,1);

ak=date[2];
delay(100);
Write(ak,2);

ak=date[3];
delay(100);
Write(ak,3);

ak=date[4];
delay(100);
Write(ak,4);

ak=date[5];
delay(100);
Write(ak,5);

but this makes the program lengthy as i will have to do the same for saving attendance ..

so what should i do that makes the loop to completely write the date??
 
Morning ash20..... if you look at this code.. tutorial 6_7 in my tutorials. It shows a sequential read / write as I said before. This allows multiple characters to be sent in one go.

Just a thought here..... Are you using global variables.... "i" for instance?
 
good morning sir. :) yupp i am using global one. because if i use local variable, it says some error related to recursiveness.

and i made a simple program for writing some data sequentially, there it is saved correctly. but being a part of large program, the same part does not work. so i have tried the above method and it works. it might seem stupid, but earlier when my program was short, both lines of my lcd were working. now as my program goes large, only the first line is working. dunno why...

so i dont think i should waste my time here... let it be as it is... i have altered some other codings to save this space.

and for resetting the memory, i have planned to completely filled the used part of the eeprom with (space) ie decimal 32 :p so it looks as if it is blank. ha ha ha...

and my (i feel) lastest problem (which if not corrected might not do any harm to me as it is out of my project limit) is that how can i show
for roll number as 1 to 60... as i told earlier, i did from 1 to 9 and 10 separately. but how could i show it till 60 assuming number of students in class are 60.??
 
and my (i feel) lastest problem (which if not corrected might not do any harm to me as it is out of my project limit) is that how can i show
for roll number as 1 to 60... as i told earlier, i did from 1 to 9 and 10 separately. but how could i show it till 60 assuming number of students in class are 60.??

Sorry I don't understand this comment... If you mean in relation to storing 10 to 60. Then I suggest that you store binary numbers and only convert them when displaying.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top