Writing to EEPROM
I am prototyping a new EEPROM.· When I enter the number of packets to receive and store, I would like to automatically write the number of packets to the Stamp EEPROM so when I want to read the stored data the Read routine will read the Stamp EEPROM and get the number of packets to read out.
I wrote:
WRITE 0, word a········ 'a was previously entered as 25
After loading and running the program, I looked at the memory Map.· There was nothing there.· Am I misunderstanding the use of WRITE?· If it does not appear in Stamp EEPROM and is not there when I reboot, this effort will avail nothing.· I do not want to write a DATA statement and reload the program everytime I change the number of packets to read.
Thanks
Sid
I wrote:
WRITE 0, word a········ 'a was previously entered as 25
After loading and running the program, I looked at the memory Map.· There was nothing there.· Am I misunderstanding the use of WRITE?· If it does not appear in Stamp EEPROM and is not there when I reboot, this effort will avail nothing.· I do not want to write a DATA statement and reload the program everytime I change the number of packets to read.
Thanks
Sid
Comments
You COULD use a 'DATA' statement, that would only be written by the BS2 IDE when you Program the chip -- you are free to change that value via WRITE on-the-fly, and it will retain what you WRITE.
Rebooting the chip does not erase the EEPROM, nor does it 'refill' the DATA statements, so that would work for you.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
If I tell the program I want to store 300 packets, and start it running, I can then go back into the program and write:
DATA word 300
This shows up immediately in the Stamp EEPROM - no necessity to reload.
So I guess I have found the best possible answer.
Sid
So when you say "DATA word 300", the Prediction is updated -- but your BS2 is not.