Shop OBEX P1 Docs P2 Docs Learn Events
DS1307 Woes — Parallax Forums

DS1307 Woes

GaryMGaryM Posts: 7
edited 2004-10-18 18:47 in BASIC Stamp
This is nuts.

Can anyone tell me why the DS1307 doesn't oscillate even·WITH the Parallax 32.7K crystals?

Is it NOT supposed to clock up without a command or something?

I am using a high quality scope with a high impedance probe and·am seeing·nothing but a steady·2.5 volts on Pin 2.· I see near ground on Pin 1.·· All the while, Jon's BS2 program is trying to read from it, faithfully sending on the SDA and SCL pins.

I am using a solderless project board, but to eliminate capacitance issues with that board, i soldered the crystals leads directly to the pins of the DS1307 and cut them short.··

Thanks to anyone who can help.

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-09-21 02:15
    The crystal we supply was originally intended for the DS1302 (we carry it in our Component Shop) which has a load capacitance (CL) of 6 pF. The DS1307 specifies a crystal with a load capacitance of 12.5 pF -- I'm not sure if this difference is enough to make a difference, but providing the right crystal might be a good start.

    I did a quick check at Digi-Key and find that the following part numbers seem to match the requirement: 300-1001-ND, 300-1002-ND, 300-1003-ND

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • GaryMGaryM Posts: 7
    edited 2004-09-21 02:35
    A difference of 6 pF is a lot with timebase crystals. I assumed the DS RTC family would all use the same crystal.
    I didnt want to use the 1302 because of that dumb reset line, tying up another port pin.

    Thanks. I'll order some 12 pf crystals and see iof that works.

    BTW, I'm a regular at Tanner's. Been trading with his family for 25 years... Good people

    Thanks
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-09-21 02:38
    Yes, those of us that live in the Metroplex are lucky to have Tanners. Perhaps Jim can get you those crystals.· If Tanners doesn't have them, perhas Altec (on Midway) does.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office


    Post Edited (Jon Williams) : 9/21/2004 2:41:17 AM GMT
  • GaryMGaryM Posts: 7
    edited 2004-09-21 03:04
    Altec? Wow. Haven't been there in years. I *Just* ordered some crystals and 1302's hehehehe oh well.
  • GaryMGaryM Posts: 7
    edited 2004-09-21 03:11
    All of this, by the way, is so I can build a 24-Hour CLOCK with a few alarm outputs. Thats all. I found a project here or on the Microchip site for a RTC using no external clock. It was all done in software, dividing down the processor's own clock. I would have used that if it were accurate but after a few hours, it was off by several minutes.

    But using any RTC IC seems like overkill. I dont need leap-Year management... I dont need days of week. I'm just interested in a reliable 86,400 second per 24 hour period.

    Can't this be done with JUST a Stamp ?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-09-21 03:49
    It could -- but you'll have to do some sofware tuning and make sure that any path through your program runs the same amount of time. I did this for an alarm product I designed using the BS2. It could time four separate channels with a resolution of 0.1 seconds (not spectacular in microcontroller terms, but much more resolution that the product actually required).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • ionion Posts: 101
    edited 2004-09-21 04:44
    The original post made me to ask myself if I am not on the same boat.
    I received recently from Parallax (maybe a month ago) 5 DS1307, and 5 crystals.
    I did not try them yet as being tied up in an other project.
    What it is the final answer to the post?
    Do I have to return the crystals back and buy them from an other source, or the issue is resolved on Parallax side?
    From what I read here, it looks like they are not compatible.
    Can anyone guide me what to do to avoid wasting time when I will use them , and make them work from start?
    Thank you
    Ion
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-09-21 05:16
    We don't sell the DS1307 -- the crystals we provide are for the DS1302 that we do in fact sell. You can return them if you'd like, and I will ask our Web folks to specify the CL value on that crystal page.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • ionion Posts: 101
    edited 2004-09-21 05:28
    I just checked the chip. They are in did DS1302 from Parallax. Sorry .
  • Tom WalkerTom Walker Posts: 509
    edited 2004-09-21 13:33
    FWIW...glitchbuster has crystals for both the '02 and '07...and you can't beat the shipping.

    Just a satisfied customer.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a man says something in the forest and there is now woman to hear him...Is he still wrong?
  • GaryMGaryM Posts: 7
    edited 2004-10-15 17:17
    Jon, You are the man.· *S*

    It was a crystal issue, the new ones arrived and all is working well now.

    Anyone in the market for a handful of useless 23Khz watch crystals? *joking*
  • PhilipPhilip Posts: 11
    edited 2004-10-17 13:06
    Newbie alert - I know nothing about this stuff!

    However, one thing that might be useful for you if you are building a clock in software without a RTC is that, certainly here in the UK, our electricity companies keep the mains frequency such that it averages 50 Hertz over both medium and long periods of time. Despite what you think when averaged over a day you get exactly 50Hz and if not they will slightly raise or lower the frequency. I don't know if the same is true in your area but if so then you could use the 50Hz (60Hz in the USA) mains frequency to keep your clock on time. It basically results in a self correcting clock that will slowly make up or lose any time necessary to keep it right.

    Have no experience of the stamp as yet so can't say how to implement it in software as I don't think the stamps do interupts but I think they can count pulses so it should be easy enough to step the mains down and square it off, you might not even need to square it off but I'm sure the experts could keep you right on that.
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-10-18 18:47
    Philip: What you say is true. If you can get a 'safe' version of the 60 hz signal ('safe' here meaning stepped down from 115V AC to like 0 to 5 volts square wave) you can use that signal to synchronize a pretty accurate clock. It would be a 16.66667 mSec/tick signal, which would be easily read with a BS2.

    The DS1302 (or DS1307, for that matter) IS an *RTC* chip, as you put it. And it sounds like the OP for this post wants a battery driven solution. Note the 1302 can run for a year on a CR2032 coin cell (I believe).

    But thanks for the input, it is a good idea.
Sign In or Register to comment.