Shop OBEX P1 Docs P2 Docs Learn Events
need data stored when power if off — Parallax Forums

need data stored when power if off

ArchiverArchiver Posts: 46,084
edited 2004-05-10 00:09 in General Discussion
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.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-05-09 23:41
    Hi,

    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.
  • ArchiverArchiver Posts: 46,084
    edited 2004-05-10 00:09
    >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.

    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.
Sign In or Register to comment.