Permanent store data using WRITE
tore eilertsen
Posts: 15
Hi.
Is it possible to store data in the bs2 memory using the write command, that will keep its value
after a power off ???
best wishes
Tore
Is it possible to store data in the bs2 memory using the write command, that will keep its value
after a power off ???
best wishes
Tore
Comments
Thanks for the answer, but wich memory location is then to be used, I have tried several locations
from 0 and upwards, and this data is gone afther a power down
(ex··· write 200,t1) or is this WRONG....
·
Use for a Byte:
WRITE x,T1
READ x, T1
Where x is the location.
The EEPROM memory for the user goes from 0 upwards and for the program storage it goes from 2047 downwards. So eventually they will meet and then the program will most likely stop working . You can see the usage of EEPROM memory in the memory map, the button just to the left of the programming button in the Stamp editor.
Regards,
Klaus
· WRITE 200, Word t1
... then read it back like this:
· READ 200, Word t1
You can use the Memory Map function of the IDE to see how much free EE space (starting at location 0) that you have for your stored information.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
I get the message "variable expected" and the 'word' in the line is marked
Why is that, this is something I realy nead..
tore
' {$STAMP BS2}
' {$PBASIC 2.5}
I sometimes assume that everyone has discovered the advantages of PBASIC 2.5 syntax.· BTW, if you don't want to use PBASIC 2.5 syntax, you can do this:
· WRITE 200, t1.LOWBYTE
· WRITE 201, t1.HIGHBYTE
This simulates using the Word modifier.· You get the value back like this:
· READ 200, t1.LOWBYTE
· READ 201, t1.HIGHBYTE
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Post Edited (Jon Williams) : 9/28/2004 5:04:31 PM GMT