help!! how to create a look-up table and store in 24lc256
Posted: Thu Apr 22, 2004 2:41 pm
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
Posted: Thu Apr 22, 2004 3:28 pm
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.
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