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

help!! how to create a look-up table and store in 24lc256

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







help!! how to create a look-up table and store in 24lc256
PostPosted: Thu Apr 22, 2004 2:41 pm     Reply with quote

can someone give me a direction or example, how to create a look up table and store in eeprom?

ex.

address ------------ Data 1(name) ------------ Data 2 (score)
-------------------------------------------------------------------------
0001----------------- Mike Corson ------------------ 62
0002 ---------------- John Greene ------------------ 95
- - -
- - -
9999---------------- Richard Campbell------------- 100


thanks!!
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Thu Apr 22, 2004 3:28 pm     Reply with quote

You should have a fixed size for each record. Maybe 16 characters and a 4 byte number. That is a 20 byte record. Then think of the EEPROM as an array as record[x,20] where x is the number of records you can hold. After offsetting x*20 bytes into the EEPROM read 20 bytes to get a record, where x is the record you want.
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