PDA

View Full Version : I2CWRITE and I2CREAD



Tomas
- 22nd April 2004, 22:25
Hi,
Can anyone help me with modifying the I2CWRITE and I2CREAD code (http://www.melabs.com/resources/samples/pbp/i2c).

I have changed it to "page write" type, now i can write all 32KB of 24LC256 with the same data and read the data. What i want to do is a bit different from this.

My I2CWRITE is in a loop and the program comes to this loop with different data to be written on the EEPROM. I want to store these data in different pages of the EEPROM as they come. For example when the program gets to the I2CWRITE loop for first time i want to store the data in, say page 1. Next time the program comes to this loop i want to store the new data in page 2 and so on. Finally i want to read the data from where they were stored.
I tried to have a counter which keep track of the page number but the data i'm reading is not those i stored.
Any idea? Please help . . .

Regards,
Tom

Melanie
- 23rd April 2004, 02:30
Answered at the end of your previous thread where you posed this question first time around.