Writing and Reading Flash
TurnipTruck
Posts: 1,485
Greetings,
Getting things on and off the flash is something that still elludes me.
Could someone give me some example code for writing an integer variable value to flash and then reading it back into that integer variable.
Thanks!
Getting things on and off the flash is something that still elludes me.
Could someone give me some example code for writing an integer variable value to flash and then reading it back into that integer variable.
Thanks!
0
Comments
Above is what I created with your help. Unfortunately, my return value is always zero, although the correct file name is created on the flash. Any suggestions? Thanks!
It's non-zero (46 to be exact). send strings back to the master result in zero.
FILE_READ (slFileHandle,cConvertedValue,LENGTH_STRING(cConvertedValue))
To this:
FILE_READ (slFileHandle,cConvertedValue,MAX_LENGTH_STRING(cConvertedValue))
Or this:
FILE_READ (slFileHandle,cConvertedValue,100)
And you should be good to go.
When cConvertedValue is declared it has no length so FILE_READ was asking for a max of 0 characters which will get you nowhere fast.:)
I'm good to go! Thanks, works like a champ.