eeprom data storage
I'm experimenting with a bs2 program that will write to and read
back data stored in an eeprom.The problem is that as soon as the bs2
is powered up,the stamp starts executing the program and writes over
the old stored data.Is it possible to write a sub-routine that will
wait for a keyboard command before overwriting the stored eeprom data?
Any and all help will be greatly appreciated,THANKS. Dave
back data stored in an eeprom.The problem is that as soon as the bs2
is powered up,the stamp starts executing the program and writes over
the old stored data.Is it possible to write a sub-routine that will
wait for a keyboard command before overwriting the stored eeprom data?
Any and all help will be greatly appreciated,THANKS. Dave
Comments
You want to tell the Stamp when to start executing. There are several ways
but here is the most positive.
Assuming you have a spare input pin, say P15. Take the pin high using a 10K
pullup resistor to 5VDC. Run a wire from the junction of the resistor and
the input pin to ground THROUGH a pushbotton so when the button is pressed
you take in input pin low. Then write the following routine at the beginning
of your program.
Begin
Count 15, 2000, y
debug ? y
if y >=1 then Start
goto begin
The Stamp will wait forever until you push the button. Be sure you insert
"y var byte" in the program introduction. Put Start wherever you want your
program to begin execution.
Hope this helps.
Sid Weaver
Newzed@a...