CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Regarding saving data to EXT EEPROM

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
jaikumar



Joined: 15 Dec 2006
Posts: 109

View user's profile Send private message

Regarding saving data to EXT EEPROM
PostPosted: Sat Apr 02, 2011 12:13 am     Reply with quote

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: 9228
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Apr 02, 2011 7:06 am     Reply with quote

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: 19515

View user's profile Send private message

PostPosted: Sat Apr 02, 2011 10:11 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group