PDA

View Full Version : Twitchy DS1307s - anyone have crystal suggestions that AREN'T quite so twitchy?



Genesis
01-14-2006, 11:55 AM
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 .....

Bean
01-14-2006, 09:15 PM
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 (http://www.sxvm.com)

"Ability may get you to the top, but it takes character to keep you there."
ˇ

Newzed
01-14-2006, 09:20 PM
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

ˇ

PJ Allen
01-14-2006, 09:54 PM
ˇ 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

Genesis
01-14-2006, 11:32 PM
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 Allen
01-16-2006, 06:13 PM
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 (http://www.emesystems.com)

Genesis
01-16-2006, 07:18 PM
Yes, and I'm aware of the "must set before it will run" requirement....

Loopy Byteloose
01-16-2006, 11:44 PM
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 [ˇ黃鶴 ]ˇin Taiwan

Tracy Allen
01-17-2006, 03:24 AM
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 (http://www.emesystems.com)

Bean
01-17-2006, 04:55 AM
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 (http://www.sxvm.com)

"Ability may get you to the top, but it takes character to keep you there."
ˇ