Shop OBEX P1 Docs P2 Docs Learn Events
ds1302 - backup battery — Parallax Forums

ds1302 - backup battery

ArchiverArchiver Posts: 46,084
edited 2004-04-26 16:02 in General Discussion
I am testing ds1302 RTC using source code from Jeff A MArtin (from
Parallax CD).


But how can I keep the clock ticking while the BS2 is off. I have used
backup battery, but I don't have appropriate source code.


Pls help me.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-04-26 04:01
    The battery backup works all by itself, you don't have to program it.

    >
    Original Message
    > From: xiemingsuk [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=2FgAHgiTzCShMIK7yvetJ8zbEc0-Qzb1ojzn9SkvzcfzMod6Kyn2mowC0iPmIcucKqtW-cYy5gPDCw]altraman@d...[/url
    > Sent: April 25, 2004 6:08 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] ds1302 - backup battery
    >
    >
    > I am testing ds1302 RTC using source code from Jeff A MArtin (from
    > Parallax CD).
    >
    >
    > But how can I keep the clock ticking while the BS2 is off. I have used
    > backup battery, but I don't have appropriate source code.
    >
    >
    > Pls help me.
    >
    >
    >
    >
    >
    >
    >
    > 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.
    >
    > Yahoo! Groups Links
    >
    >
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-26 09:29
    In a message dated 4/25/2004 10:29:25 PM Eastern Daylight Time,
    altraman@d... writes:


    > But how can I keep the clock ticking while the BS2 is off. I have used
    > backup battery, but I don't have appropriate source code.
    >
    >

    You don't need a code. If you have a backup batt attached to the clock, it
    takes over when the regular input voltge falls below the batt voltage.

    Sid Weaver
    We're always thinking.....
    http://www.visualmuses.com/chipcircuit/index.html





    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-26 11:27
    In a message dated 4/26/2004 10:20:42 AM Eastern Daylight Time,
    allan.lane@h... writes:


    > However, when your program comes up next time,
    > it MUST NOT 'set time' into the 1302, or you'll
    > wipe out the time the 1302 has been carefully
    > maintaining.
    >

    I do not think you can reset the 1302 if the battery is connected. I have
    found
    that to reset the time I have to remove the battery. The data sheet
    indicates
    that the time can only be set at original startup.

    Sid Weaver
    We're always thinking.....
    http://www.visualmuses.com/chipcircuit/index.html





    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-26 14:15
    This is true. When VCC drops, the backup battery
    takes over and runs the DS1302 internal clock,
    just like your LCD watch.

    However, when your program comes up next time,
    it MUST NOT 'set time' into the 1302, or you'll
    wipe out the time the 1302 has been carefully
    maintaining.

    --- In basicstamps@yahoogroups.com, Newzed@a... wrote:
    > In a message dated 4/25/2004 10:29:25 PM Eastern Daylight Time,
    > altraman@d... writes:
    >
    >
    > > But how can I keep the clock ticking while the BS2 is off. I have
    used
    > > backup battery, but I don't have appropriate source code.
    > >
    > >
    >
    > You don't need a code. If you have a backup batt attached to the
    clock, it
    > takes over when the regular input voltge falls below the batt
    voltage.
    >
    > Sid Weaver
    > We're always thinking.....
    > http://www.visualmuses.com/chipcircuit/index.html
    >
    >
    >
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-26 15:31
    Hello,
    Here is a code that has all of the options listed for battery
    backup.

    Stephen Swanson
    Technical Support Manager
    Parallax, Inc.
    599 Menlo Drive, #100
    Rocklin, CA 95765

    Phone (916) 624-8333
    E-mail ..... sswanson@p...
    Main site...... www.parallax.com
    Educational site.... www.parallax.com/sic
    Javelin Stamp... www.parallax.com/javelin


    Original Message
    From: xiemingsuk [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=IyhF0ldXpz_sr8-H788TXtRTEBA600w0IQoC1G5LpbyOFeymTR-v6ZSSiag_Megys76l4Khy8ruvCwx94hXj]altraman@d...[/url
    Sent: Sunday, April 25, 2004 6:08 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] ds1302 - backup battery

    I am testing ds1302 RTC using source code from Jeff A MArtin (from
    Parallax CD).


    But how can I keep the clock ticking while the BS2 is off. I have used
    backup battery, but I don't have appropriate source code.


    Pls help me.







    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.

    Yahoo! Groups Links







    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....



    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-26 16:02
    --- In basicstamps@yahoogroups.com, "xiemingsuk" <altraman@d...>
    wrote:
    > I am testing ds1302 RTC using source code from Jeff A MArtin (from
    > Parallax CD).
    >
    >
    > But how can I keep the clock ticking while the BS2 is off. I have
    used
    > backup battery, but I don't have appropriate source code.
    >
    >
    > Pls help me.

    Hi,

    First, check the pin connections. The backup battery is not on the
    same pin as the main power.

    Second, check the battery power. the chip uses the highest power
    input of the two pins, so if your backup is higher than your power
    supply you may have to do something to fix that.

    On our ChipCircit DS1302 boards, we used a battery holder so we can
    replace the battery, but Dallas/Maxim tech support reports that you
    can do anything to the clock with the power on all the time. We were
    worried about setting the clock and then someone in a different
    timezone using it if the battery was soldered on.

    But, Vcc2 (pin 1) is the main power and Vcc1 (pin 8) is for the
    battery backup. Vcc2 must be 0.02 volts higer than Vcc1.

    Also, if you are using a lithum battery, make sure you have the
    trickle charger turned OFF. Or, really, make sure you don't turn it
    on as it ships OFF by default. A battery will self drain faster than
    this chip will drain it. A button will last over 10 years in full
    back-up. Also, the button drain will stop when you apply power to
    pin1. That means your back-up on a all-the-time powered circuit will
    last the life of the battert shelf life. Some papers say 17 years,
    others say over 20 for a button. (I'm wondering what a BS will be in
    20 years....)

    Dave

    http://www.visualmuses.com/chipcircuit/index.html
Sign In or Register to comment.