Page 1 of 1

Storing a $tring in EEPROM

Posted: Mon Feb 15, 2016 6:59 am
by keejay
Hi there,

I have a $tring that I need to save into EEPROM on a PIC. How would one go about doing this? The EEPROM 8 bit and the string is 20 charaters long. I know how to do this for long numbers, but not quite sure what format to store the string in EEPROM.

Re: Storing a $tring in EEPROM

Posted: Mon Feb 15, 2016 6:38 pm
by Benj
Hello,

A string is basically just an array of bytes with a null byte at the end to signify the end of data.

Here is an example to read and write strings to the EE memory to get you started.
StringEE.fcfx
(8.64 KiB) Downloaded 387 times

Re: Storing a $tring in EEPROM

Posted: Tue Feb 16, 2016 7:49 am
by keejay
Thanks Benji,

I'll give that a go.

Storing a $tring in PIC EEPROM

Posted: Sat Feb 24, 2018 8:29 pm
by keejay
Hi,

I was wondering what the best way was to store a string variable of approx 10 characters in the PIC onboard EEPROM? Any ideas?

Re: Storing a $tring in PIC EEPROM

Posted: Sun Feb 25, 2018 12:14 am
by medelec35
Hi keejay,
You already asked this question here
It was answered for you.

Martin

Re: Storing a $tring in PIC EEPROM

Posted: Mon Feb 26, 2018 11:18 am
by Benj

Re: Storing a $tring in PIC EEPROM

Posted: Fri Mar 02, 2018 6:55 pm
by keejay
Thanks very much, I must have missed that somehow.