View previous topic :: View next topic |
Author |
Message |
jaikumar
Joined: 15 Dec 2006 Posts: 109
|
Regarding saving data to EXT EEPROM |
Posted: Sat Apr 02, 2011 12:13 am |
|
|
Hi All,
I want to save stream of data which are in groups of 144 bytes.
I am using 24C512 eeprom. This has a page boundary of 128 bytes.
How can I split this data, so I can save to eeprom using page write.
Any help/Ideas would be great?
Thanks & Regards,
Jai. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9221 Location: Greensville,Ontario
|
|
Posted: Sat Apr 02, 2011 7:06 am |
|
|
one way...
You could setup a circular buffer of 160 bytes, every write to eeprom would save the first 128 bytes of the 144 of the msg to a page. The 'last' 16 bytes would be stored (in front of ) with the first 112 of the next msg. Obviously you have to keep track of the msg 'number' vs. the eeprom 'page'.
Not all that hard to do, just write it down on graph paper to see how it works. It's a 'trick' I've done for the past 30 years to NOT waste memory space. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19498
|
|
Posted: Sat Apr 02, 2011 10:11 am |
|
|
Or of course, depending on available RAM, and how often data needs to be written, realise that 8 messages=9 EEPROM pages. Have an 8 message buffer in the chip, and write 9 pages when this fills.
Best Wishes |
|
|
|