Shop OBEX P1 Docs P2 Docs Learn Events
Twitchy DS1307s - anyone have crystal suggestions that AREN'T quite so twitchy? — Parallax Forums

Twitchy DS1307s - anyone have crystal suggestions that AREN'T quite so twitchy?

GenesisGenesis Posts: 42
edited 2006-01-16 21:55 in BASIC Stamp
Maxim makes a big deal about keeping crystals "as close as practical" to the chip.... you have no idea!

I've been pulling my hair out now for a couple of days on a PCB that has a DS1307 and is using a BS2pe.· Works using the PDB's clock (same chip), but the dang thing would NOT oscillate for love or money when on a PCB build-up with a through-hole (DIP-8) chip on the board.

I'm using the Citizen CFS145, which is a very small crystal and is one of the ones that Maxim shows as being "acceptable."

Well, its twitchy as hell.· The pads for the crystal mounting are literally one hole-width from the IC's pins.· With the crystal in there it will NOT oscillate!· Period!· The chip is working fine otherwise - it saves/restores data, I can write and read it, the battery works, etc - but no oscillation.· There's no problem with stray pulses - I've followed all their rules, there are no traces under the footprint of the crystal or its pins on the board, etc.

If I remove the crystal from the board and physically touch it to the two pins of the chip itself - it oscillates!· If I solder it DIRECTLY to the pins on the back side of the board, it oscillates.· But literally 1mm away - it does not.

Wild stuff.

I'm wondering if anyone else has used any of the Dallas RTC chips in a through-hole config on a PCB and if you've found a crystal that is a bit more tolerant - or if I just need to do it this way and then stick a blob of epoxy over the crystal and two pins to protect it once assembled.....· SMT is not an option for now, although it may be in the future.

Or, for that matter, if anyone knows which crystal is being used on the PDB - since that one's obviously working well .....

Comments

  • BeanBean Posts: 8,129
    edited 2006-01-14 14:15
    You may need a small capacitor on either side of the xtal to ground. Maybe 20pF or so ? It's just a guess, but it's worth a try.
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Ability may get you to the top, but it takes character to keep you there."
    ·
  • NewzedNewzed Posts: 2,503
    edited 2006-01-14 14:20
    Are you using a crystal with a capacitance of 12.5pf?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Do you have a Stamp Tester yet?
    http://hometown.aol.com/newzed/index.html

    ·
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-01-14 14:54
    · Datasheet says no external capacitors req'd.

    · DIP-8, you say.· Are you using an IC socket?· If you are, then don't; solder the IC to the PCB.

    · Another thing, maybe you have a no-good via or two, so solder on both sides of the crystal & IC.




    Post Edited (PJ Allen) : 1/14/2006 3:03:02 PM GMT
  • GenesisGenesis Posts: 42
    edited 2006-01-14 16:32
    Yep - datasheet says the caps are internal. Tried external load caps (12pf each) with no change too!

    No socket - chip is soldered to the board.

    Its VERY repeatable - soldered to the pins of the chip it works. Soldered to the pad (which is literally 1mm away from the pin pad itself - close enough that soldering to it bridges to the pad with the reflow!) reliably fails.

    Two different crystals, so I'm reasonably sure I don't have a bad one.

    I think I'm going to order some different crystals on the theory that these particular Citizen ones are just too twitchy in this application.... I don't get it though - from what I can see on the PDB the crystal is about a cm off from the chip and works fine..... and it DOES have external bypass caps!
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2006-01-16 11:13
    Do you have the backup battery connected (3 volt coin cell)? If not, be sure to ground the battery input and not leave it floating. The chip can be maddenly unpredictable if that pin is left floating.

    Also, when the chip is first powered up, the clock oscillator does not run until bit 7 of the seconds register is changed (by command from your program) from a 1 to 0.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • GenesisGenesis Posts: 42
    edited 2006-01-16 12:18
    Yes, and I'm aware of the "must set before it will run" requirement....
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-01-16 16:44
    Could a 1meg resistor in parallel help? Seems worth a try.

    Sadly, this just makes me feel that the newer clock with the crystal inside is the one to buy.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2006-01-16 20:24
    I've used a Citizen xtal without a hitch on the DS1307, but it was the low profile surface mount CM-155. The xtal was mounted close to the chip (also surface mount), but a few mm should not make a whit of difference. My guess is that there is a hairline crack in your circuit board trace around the pad, or a cold solder joint or something !#%$# like that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • BeanBean Posts: 8,129
    edited 2006-01-16 21:55
    I agree. At 32Khz a couple mm should not make any difference at all.
    If you were talking 100MHz then maybe...
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Ability may get you to the top, but it takes character to keep you there."
    ·
Sign In or Register to comment.