Help! How do you address Word size data to Byte size to store in EEPROM?
Nerd_in_training
Posts: 4
We are using the basic stamp and need more storage space for data than is onboard.·· However we need to store our data in word size.· We are using the Xicor X25640 EEPROM that stores data only in Byte size.· How do we store Word Size data in Byte size EEPROM?· Thank you for your much needed Help!!
Comments
You will need to store TWO bytes for every word you want to save. They will be in the form of:
var_name.highbyte and var_name.lowbyte
Each is 1/2 of the word in a byte sized chunk. To retieve it you just reverse the process.
Regards,
Bruce Bates
You can also use the Word formatter to specify a word size variable, but if you’re using an index variable as an offset for multiple writes be sure to increase it by 2 after each write. Here are some examples of using WRITE.
Notice that the third item is writing at address 3 instead of 2 since the previous write was a word value (2 bytes).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support