need data stored when power if off
Archiver
Posts: 46,084
Hi there... I need a process where I can store a 4 digit number
somehow, generated from the BS2 to be brought back when BS2 is back
on. In other words I need a way to keep track of a counter so BS2 can
read the old count and then add to that when turned back on. Somehow
like a clock, that has also the ability to store a number (up to 4
digits).
PLEASE HELP..... Thank you all.
somehow, generated from the BS2 to be brought back when BS2 is back
on. In other words I need a way to keep track of a counter so BS2 can
read the old count and then add to that when turned back on. Somehow
like a clock, that has also the ability to store a number (up to 4
digits).
PLEASE HELP..... Thank you all.
Comments
You can store data in EEPROM, look for the keywords WRITE and READ in
the (on line) help manual.
Regards,
Klaus
--- In basicstamps@yahoogroups.com, "basilmelbourne"
<basilmelbourne@y...> wrote:
> Hi there... I need a process where I can store a 4 digit number
> somehow, generated from the BS2 to be brought back when BS2 is back
> on. In other words I need a way to keep track of a counter so BS2
can
> read the old count and then add to that when turned back on.
Somehow
> like a clock, that has also the ability to store a number (up to 4
> digits).
> PLEASE HELP..... Thank you all.
>somehow, generated from the BS2 to be brought back when BS2 is back
>on. In other words I need a way to keep track of a counter so BS2 can
>read the old count and then add to that when turned back on. Somehow
>like a clock, that has also the ability to store a number (up to 4
>digits).
>PLEASE HELP..... Thank you all.
Many real time clock chips include additional RAM that is perfect for
this purpose. The real time clock and its RAM are backed up by a
battery or a capacitor.
On the Stamp itself, you can store the counter in EEPROM if it only
has to be done occasionally. Each location in the EEPROM has a
limited life for write cycles, somewhere in the 10000 to 100000
range. At once a day, no problem, but at once a second, well, there
are 86400 seconds in a day.