dear all
i am stuck in a mid part of the project... i want to interface at24c08 eeprom with p89v51rd2... please can any one write a workable code for me...
i only want ot send bytes of character and store it there so that i can retrieve the data some time later... please help me... i m in a bad situation... i have tried many other code available on the net but its not working... please help...
I had a very very quick look at the unformatted posted code. what a mess! have you noticed that your program probably (unless I missed the indentation...) hangs in an infinite loop? here:
end: while(1) goto end; }
also check the timing of your I2C signals. have you looked at the data sheet for full information regarding that issue? note that depending on your hardware speed, the generated waveform can change significantly violating minimum/maximum holding times for the signals. and try to avoid using goto.
an infinite loop after a single interaction might be exactly what you want, of course.
Why make such a complicated infinite loop?
Wouldn't
while (1) ;
or
for (;;) ;
do {} while (0);
be a bit simpler to write - and not involve the #1 spaghetti construct "goto"?