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.
Storing a $tring in EEPROM
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Storing a $tring in EEPROM
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode v5 User
- Posts: 115
- Joined: Tue Jul 23, 2013 10:02 am
- Been thanked: 15 times
- Contact:
Storing a $tring in PIC EEPROM
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?
I was wondering what the best way was to store a string variable of approx 10 characters in the PIC onboard EEPROM? Any ideas?
Last edited by EtsDriver on Fri Mar 16, 2018 9:50 am, edited 1 time in total.
Reason: Merged with your old topic.
Reason: Merged with your old topic.
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Storing a $tring in PIC EEPROM
Also here in the wiki,
https://www.matrixtsl.com/wikiv7/index. ... _(Storage)
https://www.matrixtsl.com/wikiv7/index. ... _(Storage)
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel