Shop OBEX P1 Docs P2 Docs Learn Events
Resetting The Current Time In A DS1302 — Parallax Forums

Resetting The Current Time In A DS1302

KatyBriKatyBri Posts: 171
edited 2007-07-06 17:19 in BASIC Stamp
I'm working on the design of another STAMP BS2 / DS1302 application.

How does one deal with the situation of needing to reload the current time when the DS1302 looses it?

Even with power backup, there could be times when the power is lost long enough, that the time may need to be reloaded.

How does one deal with this during the design phase of a project- what do you do to allow the current time to be loaded easily into the DS1302 if it is required- hardware/software?

Thanks.

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-07-03 04:57
    When I need to set my DS1302 I use the code at the following link. I have it opened on a tab in the BASIC Stamp Editor. When I need to reset the time I switch to it, download it, set everything and then re-run my original code. Take care.

    http://forums.parallax.com/showthread.php?p=531080

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • KatyBriKatyBri Posts: 171
    edited 2007-07-04 02:41
    Thanks!
  • RDL2004RDL2004 Posts: 2,554
    edited 2007-07-04 09:29
    For use in a finished project, I have the idea of using two separate eeproms that are selected by a switch.

    There will be circuitry that will force a reset of the Stamp when changing from one eeprom to the other while the RTC continues to run.

    One eeprom would be programmed with the normal "run" code, the other will have the "setting" code.

    This of course will only work with some type of OEM Stamp where the eeprom is accessible and is not for the normal pre-assembled Stamps. It is intended for use in a situation where the normal "run" code is large and it is not feasible to fit the "setting" code in the same eeprom and there will be no PC available (or no port provided) to re-program the Stamp.

    The additional eeprom and switching circuitry should not add more than a few dollars to the cost of the final project.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Rick
  • Nick WaldvogelNick Waldvogel Posts: 71
    edited 2007-07-06 17:19
    The stamp works manual describes how to use four push buttons to change the time.·

    Try this link:·· http://www.parallax.com/detail.asp?product_id=27220

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sign In or Register to comment.