Write text to eeprom

spinnaker

Joined Oct 29, 2009
7,830
Yes of course. Strings are nothing but bytes but if you are just going to store days then why not store a pseudonyms / token instead?


0x00 = Sunday
0x01 = Monday
0x02 = Tuesday

and so on.

Then your would simply translate that when it needs to be displayed.
 
Last edited:

Thread Starter

FroceMaster

Joined Jan 28, 2012
702
yes i could do that, but it would be better to just read direct from eeprom, just to save space in 16f690, have plenty space in eeprom, but program space is nearly full,
 

spinnaker

Joined Oct 29, 2009
7,830
But more complicated. A lot easier to store the token. I would doubt there would be too much of a coding size anyway. Remember you will still need to write a loop to store the string.
 

ErnieM

Joined Apr 24, 2011
8,377
Hi.

is it possible to "store" text, ex string like " Monday" into the EEPROM of a 16f`690
Yes it is, and you will save program space as the actual string data is being saved in EEPROM as opposed to saving it in program space. Either way you may well be copying it to a RAM buffer to use it anyway.

The strings have various lengths ( and always end in "day") so you need to encode the length also, just a zero is fine.

You will also need a pointer to each of the strings. Again, you can trade wasted EEPROM for less ROM.
 
Top