I've used a similar approach, but I only maintain 4 bytes with the UNIX time
and pass that value to another device that is the interface with humans. That
device was a PC using the RS-232 port, so in the PC I can use the time.h in a C
program that convert the UNIX time obtained from the MSP430 to an human
readable time and vice-versa. This approach can help you, or probably it can't
be useful in your system... I don't know.
Mario
Stokes, Mark wrote:
No, I'm using the internal 32k crystal to maintain the time with the basic
timer. The
accuracy is not critical, and when the main battery is replaced (~6years), the
time
would need to be corrected for the time it takes to replace the battery. I'm
using it
for a datalogger output.
As you can probably tell, I can't stand to use 500uA to 2mA for active mode usage (as
the DS1390 uses). I also don't even want to loose 60 to 175uA as this is
almost 1/2 of
the overall system current.
It looks like from the datasheet, the function of the time.h functions is
already built
in to the chip as everything is accessed in component parts (H:M:S;D:M:Y, etc).
I'm
maintaining the UNIX time variable (this is very easy), but need an easy way to
have a
human enter that time (and I don't think telling them to go to a converter and
get the
number is viable).
Thanks for the idea tho.
-Mark