Pages: [1]   Go Down
Author Topic: I2C EEPROM simple read and write functions  (Read 1705 times)
0 Members and 1 Guest are viewing this topic.
Rochester NY
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Expand your mind.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

While working on a Reverse Geo Cache project i came across the need to store variables for future use. Since I roll my own boards this required an external I2C EEPROM. Running into multiple problems while trying to write floats and long int's with typical bit-by-bit writing methods I modified the "EEPROM Write Anything" header file to work with a 24LC256 EEPROM (and others with a definition change).

I did a write up (link below) explaining some of the changes and posted some example code to get things rolling.
http://evolveelectronics.net/?p=920

I hope this helps someone attempting to interface with external memory. Happy Hacking!
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 224
Posts: 13917
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Note there are issues with 64 bytes pages boundaries. See my article on the playground no url at hand, sorry.
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Rochester NY
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Expand your mind.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Note there are issues with 64 bytes pages boundaries. See my article on the playground no url at hand, sorry.

I saw that i cannot find the post either. As you can see the majority of the I2C portion (Wire funcitons) are based off of your code with some slight modifications. I figured out that i can create more than one structure to split up the data  if the byte count gets to close to 64-bytes.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 224
Posts: 13917
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The link - http://arduino.cc/playground/Main/LibraryForI2CEEPROM - smiley
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: