Shop OBEX P1 Docs P2 Docs Learn Events
DS1305 Help — Parallax Forums

DS1305 Help

ArchiverArchiver Posts: 46,084
edited 2003-03-28 19:49 in General Discussion
Hello again.

I'm using a dallas semicondoctor DS1305 Real Time Clock within a
project that I am working on and I am trying to get the backup system
to work. The main question I have is this. When the DS1305 loses
primary power and switches to backup, is the oscillator supposed to
keep running?

I am using a super cap which I know is charging properly. I have set
the trickle charge register and confirmed its value. I also know
that in order for the oscillator to operate, the oscillator enable
bit must be reset (0) in the control register. After doing some
tests, I have found that the DS1305 will keep timing, as expected, if
I remove power to the DS1305 only, BS2 still has power. If I remove
power from the entire system (BS2 and DS1305), as would be expected
in a power outage, the DS1305 retains its memory but stops
incrementing the time. Unfortunately, I can't reinitialize the
oscillator once the DS1305 has switched to backup power.

I know that Parallax has a AppKit which uses the DS1302, I have
referenced that but no help there. The DS1305 is almost identical to
the DS1302 other than more onboard RAM, two alarms, and the
addressing is different. However, as far as I can tell, the trickle
charge system is identical.

I know this is a lot to read through but any assistance anyone gives
will be much appreciated. Also, doesn't it seem pointless to have a
backup on a RTC that doesn't keep the correct time if power fails.
This is my cause of confusion.

Help Please

Kevin

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-03-28 15:59
    Hmm! I used the 1302 with a 3 volt coin cell,
    and yes, the timing oscillator keeps running
    even when main power is down. I havn't used
    a SuperCap yet, so can't address how long one
    should run. The Timer should keep running
    as long as VCC1 is greater than 2 volts.
    (assuming you've put a 32.768 Khz crystal
    across pins 2 and 3)

    'Main' power (same as stamp) should go into
    VCC2 (pin 1), while backup power goes into
    VCC1 (pin 8) -- which is also the charge out pin.
    "When VCC2 is greater than VCC1 + .02V, VCC2 will
    power the 1302. When VCC2 is less than VCC1,
    VCC1 will power the 1302".

    I thought the oscillator stop bit was ONLY
    for a low-power (100 nA) mode -- usually I set
    it to 0 (RUN clock) and leave it alone.

    The 1305 sounds interesting -- I wanted a timer
    driver interrupt for another project, this could
    help.

    --- In basicstamps@yahoogroups.com, "nofinger22" <nofinger22@y...>
    wrote:
    > Hello again.
    >
    > I'm using a dallas semicondoctor DS1305 Real Time Clock within a
    > project that I am working on and I am trying to get the backup
    system
    > to work. The main question I have is this. When the DS1305 loses
    > primary power and switches to backup, is the oscillator supposed to
    > keep running?
    >
    > I am using a super cap which I know is charging properly. I have
    set
    > the trickle charge register and confirmed its value. I also know
    > that in order for the oscillator to operate, the oscillator enable
    > bit must be reset (0) in the control register. After doing some
    > tests, I have found that the DS1305 will keep timing, as expected,
    if
    > I remove power to the DS1305 only, BS2 still has power. If I
    remove
    > power from the entire system (BS2 and DS1305), as would be expected
    > in a power outage, the DS1305 retains its memory but stops
    > incrementing the time. Unfortunately, I can't reinitialize the
    > oscillator once the DS1305 has switched to backup power.
    >
    > I know that Parallax has a AppKit which uses the DS1302, I have
    > referenced that but no help there. The DS1305 is almost identical
    to
    > the DS1302 other than more onboard RAM, two alarms, and the
    > addressing is different. However, as far as I can tell, the
    trickle
    > charge system is identical.
    >
    > I know this is a lot to read through but any assistance anyone
    gives
    > will be much appreciated. Also, doesn't it seem pointless to have
    a
    > backup on a RTC that doesn't keep the correct time if power fails.
    > This is my cause of confusion.
    >
    > Help Please
    >
    > Kevin
  • ArchiverArchiver Posts: 46,084
    edited 2003-03-28 16:51
    Just looked at the 1305 datasheet -- noticed
    that the 1302 has 40 KOhm pull-downs on its
    SPI pins -- the 1305 looks like not.

    Perhaps you need pull-downs to insure the
    SPI pins stay inactive when you power off
    the Stamp? (Data, Clock, ChipSelect)
  • ArchiverArchiver Posts: 46,084
    edited 2003-03-28 17:10
    I was originally going to use a lithium cell but thought a supercap would be
    better beings it shouldn't ever have to be replaced, unlike the lithium
    cell. I may have to try it with the lithium cell. The DS1305 uses three
    different power pins, one for primary, one for trickle charged backup, and a
    third specifically for a non-rechargable battery.

    Like you, I had planned, and still planning, on enabling the oscillator and
    then leaving it alone. I was just trying a few things to see if I could
    keep the oscillator running after RTC lost primary power.

    What has me baffled is the fact that the oscillator continues running
    normally without primary power if the BS2 has power and is still connected
    to the RTC. Remove power from the BS2 and the RTC stops keeping time. I
    have checked voltages on the RTC, while the unit is running off of backup
    power and the BS2 has power to see if somehow the RTC is getting supply
    voltage from the BS2 but I can't find anything.

    Thanks

    Original Message
    From: "Allan Lane" <allan.lane@h...>
    To: <basicstamps@yahoogroups.com>
    Sent: Friday, March 28, 2003 9:59 AM
    Subject: [noparse][[/noparse]basicstamps] Re: DS1305 Help


    > Hmm! I used the 1302 with a 3 volt coin cell,
    > and yes, the timing oscillator keeps running
    > even when main power is down. I havn't used
    > a SuperCap yet, so can't address how long one
    > should run. The Timer should keep running
    > as long as VCC1 is greater than 2 volts.
    > (assuming you've put a 32.768 Khz crystal
    > across pins 2 and 3)
    >
    > 'Main' power (same as stamp) should go into
    > VCC2 (pin 1), while backup power goes into
    > VCC1 (pin 8) -- which is also the charge out pin.
    > "When VCC2 is greater than VCC1 + .02V, VCC2 will
    > power the 1302. When VCC2 is less than VCC1,
    > VCC1 will power the 1302".
    >
    > I thought the oscillator stop bit was ONLY
    > for a low-power (100 nA) mode -- usually I set
    > it to 0 (RUN clock) and leave it alone.
    >
    > The 1305 sounds interesting -- I wanted a timer
    > driver interrupt for another project, this could
    > help.
    >
    > --- In basicstamps@yahoogroups.com, "nofinger22" <nofinger22@y...>
    > wrote:
    > > Hello again.
    > >
    > > I'm using a dallas semicondoctor DS1305 Real Time Clock within a
    > > project that I am working on and I am trying to get the backup
    > system
    > > to work. The main question I have is this. When the DS1305 loses
    > > primary power and switches to backup, is the oscillator supposed to
    > > keep running?
    > >
    > > I am using a super cap which I know is charging properly. I have
    > set
    > > the trickle charge register and confirmed its value. I also know
    > > that in order for the oscillator to operate, the oscillator enable
    > > bit must be reset (0) in the control register. After doing some
    > > tests, I have found that the DS1305 will keep timing, as expected,
    > if
    > > I remove power to the DS1305 only, BS2 still has power. If I
    > remove
    > > power from the entire system (BS2 and DS1305), as would be expected
    > > in a power outage, the DS1305 retains its memory but stops
    > > incrementing the time. Unfortunately, I can't reinitialize the
    > > oscillator once the DS1305 has switched to backup power.
    > >
    > > I know that Parallax has a AppKit which uses the DS1302, I have
    > > referenced that but no help there. The DS1305 is almost identical
    > to
    > > the DS1302 other than more onboard RAM, two alarms, and the
    > > addressing is different. However, as far as I can tell, the
    > trickle
    > > charge system is identical.
    > >
    > > I know this is a lot to read through but any assistance anyone
    > gives
    > > will be much appreciated. Also, doesn't it seem pointless to have
    > a
    > > backup on a RTC that doesn't keep the correct time if power fails.
    > > This is my cause of confusion.
    > >
    > > Help Please
    > >
    > > Kevin
    >
    >
    > 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/
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-03-28 17:23
    I see that too. I will give that a try and let you know. Just to clarify,
    your saying put a 40Kohm resistor from the I/O pins to ground.

    Original Message
    From: "Allan Lane" <allan.lane@h...>
    To: <basicstamps@yahoogroups.com>
    Sent: Friday, March 28, 2003 10:51 AM
    Subject: [noparse][[/noparse]basicstamps] Re: DS1305 Help


    > Just looked at the 1305 datasheet -- noticed
    > that the 1302 has 40 KOhm pull-downs on its
    > SPI pins -- the 1305 looks like not.
    >
    > Perhaps you need pull-downs to insure the
    > SPI pins stay inactive when you power off
    > the Stamp? (Data, Clock, ChipSelect)
    >
    >
    > 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/
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-03-28 19:49
    Yes, a separate 40 Kohm resistor to ground from:
    The Clock Pin, the Data Pin, and the Chip Select Pin.
    3 resistors total. (maybe 4, if you have separate
    DataOut and DataIn pins)

    --- In basicstamps@yahoogroups.com, "Kevin Novinger"
    <nofinger22@y...> wrote:
    > I see that too. I will give that a try and let you know. Just to
    clarify,
    > your saying put a 40Kohm resistor from the I/O pins to ground.
    >
    >
    Original Message
    > From: "Allan Lane" <allan.lane@h...>
    > To: <basicstamps@yahoogroups.com>
    > Sent: Friday, March 28, 2003 10:51 AM
    > Subject: [noparse][[/noparse]basicstamps] Re: DS1305 Help
    >
    >
    > > Just looked at the 1305 datasheet -- noticed
    > > that the 1302 has 40 KOhm pull-downs on its
    > > SPI pins -- the 1305 looks like not.
    > >
    > > Perhaps you need pull-downs to insure the
    > > SPI pins stay inactive when you power off
    > > the Stamp? (Data, Clock, ChipSelect)
    > >
    > >
    > > 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/
    > >
Sign In or Register to comment.