Save variables on power down
I'd like to make use of the ability to write to non-volitile memory on
powering down my BS2SX project. Can anyone point to circuit examples that
can set a pin to indicate impending shutdown as well as short term power
supply (capacitor?) while the write happens?
I'm using the Stamp and a BOB-II as part of a remote control for a 35mm SLR
and would like to keep track of the number of photos taken. Then on
power-down the count is saved and read back in on power-up.
-Eric
powering down my BS2SX project. Can anyone point to circuit examples that
can set a pin to indicate impending shutdown as well as short term power
supply (capacitor?) while the write happens?
I'm using the Stamp and a BOB-II as part of a remote control for a 35mm SLR
and would like to keep track of the number of photos taken. Then on
power-down the count is saved and read back in on power-up.
-Eric
Comments
by using a super capacitor or even a battery to hold power to the Stamp.
Then you'd just read the "main" power and if you see it go to zero, save
your data and either go to sleep or wait for sleep to overtake you :-)
The BS2SX takes quite a bit of power, though, so I'd say you wouldn't
have much time unless you use a battery (and then charge the battery
while power is good).
Al Williams
AWC
* Floating point A/D
http://www.al-williams.com/awce/pak9.htm
>
Original Message
> From: Eric Dustrude [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=ws1FaU2gtW4xKK8gXnFUiOcI4NvoFQE0XGR1LDbvOjnxBcJv__r9TPy1e6Lobk-MaxtksopCHxiSsPn3hw]models@d...[/url
> Sent: Tuesday, October 22, 2002 11:21 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Save variables on power down
>
>
> I'd like to make use of the ability to write to non-volitile
> memory on powering down my BS2SX project. Can anyone point to
> circuit examples that can set a pin to indicate impending
> shutdown as well as short term power supply (capacitor?)
> while the write happens?
>
> I'm using the Stamp and a BOB-II as part of a remote control
> for a 35mm SLR and would like to keep track of the number of
> photos taken. Then on power-down the count is saved and read
> back in on power-up.
>
> -Eric
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
> Subject and Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>
simply save the count each time it gets incremented. You might want to hang
a supercap on the downstream side of the regulator, just to get you through
the write-cycle in case power drops when you're trying to save your photo
count.
-- Jon Williams
-- Parallax
In a message dated 10/22/02 11:21:21 PM Central Daylight Time,
models@d... writes:
> I'd like to make use of the ability to write to non-volitile memory on
> powering down my BS2SX project. Can anyone point to circuit examples that
> can set a pin to indicate impending shutdown as well as short term power
> supply (capacitor?) while the write happens?
>
> I'm using the Stamp and a BOB-II as part of a remote control for a 35mm SLR
> and would like to keep track of the number of photos taken. Then on
>
[noparse][[/noparse]Non-text portions of this message have been removed]
performance penalty for writing to EEPROM might be large (relative to
RAM). As I'm attempting to juggle a number of inputs besides the
photo count and want a good response time for all the inputs, I
thought the writing to EEPROM might be a bottleneck. I also see from
a little more reading that the time to write may not be as
significant as I thought - relative to the execution speed of the
stamp anyway.
I guess I should experiment with it before making the problem more
complcated than it needs to be [noparse]:)[/noparse]
Thanks for your quick response!
-Eric
--- In basicstamps@y..., jonwms@a... wrote:
> If the only thing you're saving is the photo count, I would suggest
that you
> simply save the count each time it gets incremented. You might
want to hang
> a supercap on the downstream side of the regulator, just to get you
through
> the write-cycle in case power drops when you're trying to save your
photo
> count.
>
> -- Jon Williams
> -- Parallax
write cycle is 10 to 25 milliseconds -- which is certainly faster than
winding to the next frame of film.
-- Jon Williams
-- Parallax
In a message dated 10/23/02 12:38:26 AM Central Daylight Time,
models@d... writes:
> I'm pretty new to this game and thought I'd read somewhere that the
> performance penalty for writing to EEPROM might be large (relative to
> RAM). As I'm attempting to juggle a number of inputs besides the
> photo count and want a good response time for all the inputs, I
> thought the writing to EEPROM might be a bottleneck. I also see from
> a little more reading that the time to write may not be as
> significant as I thought - relative to the execution speed of the
> stamp anyway.
>
> I guess I should experiment with it before making the problem more
> complcated than it needs to be [noparse]:)[/noparse]
>
> Thanks for your quick response!
>
> -Eric
>
[noparse][[/noparse]Non-text portions of this message have been removed]