CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

DS1307 starting at faster frequency
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
40inD



Joined: 30 Jul 2007
Posts: 112
Location: Moscow, Russia

View user's profile Send private message

DS1307 starting at faster frequency
PostPosted: Thu Apr 10, 2014 12:13 am     Reply with quote

Has anyone encountered a problem when DS1037 starts at frequency about 10 times faster, and when touch the chip contacts or quartz by finger chip goes then to run normal?
What can that be? Bad quartz? Or bad pcb routing?
Jerson



Joined: 31 Jul 2009
Posts: 122
Location: Bombay, India

View user's profile Send private message Visit poster's website

PostPosted: Thu Apr 10, 2014 2:32 am     Reply with quote

Check capacitors across quartz and verify voltage supply to the DS1307 is correct.
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Thu Apr 10, 2014 6:16 am     Reply with quote

Jerson,

What are you talking about? The DS1307 does not require any "capacitors across quartz". Specifically, here is what the datasheet says about that issue: "The oscillator circuit does not require any external resistors or capacitors to operate."

To the OP, have *you* read the datasheet? It clearly states the specifications for the crystals that can be used, and details the recommended board layout. In my experience, as long as you've got a 'standard 32.768KHz crystal", it should pretty much work..... Key point is read the datasheet!

John
Ttelmah



Joined: 11 Mar 2010
Posts: 19346

View user's profile Send private message

PostPosted: Thu Apr 10, 2014 7:14 am     Reply with quote

Agreed.

Another point is that once the oscillator is started, it should never stop. So why are you seeing it 'start'?. Provided you have the correct battery connections, the oscillator should still be running is several years time....
temtronic



Joined: 01 Jul 2010
Posts: 9164
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Apr 10, 2014 7:21 am     Reply with quote

also agree...
I've got a couple test setups from 3 years ago on 'bad' white breadboards and they are still running fine.Breadboards aren't 'great' but work OK for test purposes.
You _must_ use a coin cell battery( it's in the specs) and have a 'good' xtal though the cheap ones work fine,just not accurate in the long term...

hth
jay
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Apr 10, 2014 7:43 am     Reply with quote

Quote:
Or bad pcb routing?

You probably have PCB tracks from other circuits running next to the
crystal and the crystal pins on the ds1307. These pcb tracks will couple
extra impulses into the crystal circuit, which could result in the RTC
running too fast. Maxim has on their website, detailed explanations of
how to properly do the pcb layout for the ds1307 crystal circuit.
40inD



Joined: 30 Jul 2007
Posts: 112
Location: Moscow, Russia

View user's profile Send private message

PostPosted: Thu Apr 10, 2014 7:52 am     Reply with quote

I mean, when I turning on my device, in more than 50% cases the ds1307 begins to run more faster until I thouch it X1, X2 contacts or crystal.
Of course I have read datasheet, and i have many other devices with 1307 working fine.
Just wonder about this case.
I will try to replace crystal.
40inD



Joined: 30 Jul 2007
Posts: 112
Location: Moscow, Russia

View user's profile Send private message

PostPosted: Thu Apr 10, 2014 8:15 am     Reply with quote

PCM programmer wrote:

You probably have PCB tracks from other circuits running next to the
crystal and the crystal pins on the ds1307.


PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Apr 10, 2014 8:46 am     Reply with quote

It's not the ideal layout that Maxim wants. Maxim shows the preferred
layout about halfway down this page:
http://www.maximintegrated.com/app-notes/index.mvp/id/504

This guy discusses ds1307 crystal layouts. Most of the layouts that work
have ground hatch under the crystal. The one layout that doesn't work
has no ground plane and has pcb tracks all around the crystal.
https://rayshobby.net/?p=5962

Your board could have some other problem, maybe in the individual
crystal, but the layout still isn't perfect.
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Thu Apr 10, 2014 9:06 am     Reply with quote

Hi,

Are you sure that you are using the correct crystal? I'm not saying they don't exist, but every '32.768 KHz' crystal I've ever seen has come in a cylindrical style package. I just checked Digikey, and they don't sell anything else! I suppose you may have just placed a footprint you had on hand without attempting to match your physical crystal?

Anyway, the datasheet says this: NOTE: AVOID ROUTING SIGNAL LINES IN THE CROSSHATCHED AREA (UPPER LEFT QUADRANT) OF THE PACKAGE UNLESS THERE IS A GROUND PLANE BETWEEN THE SIGNAL LINE AND THE DEVICE PACKAGE. You appear to be violating this recommendation with the placement of the etch passing underneath your crystal....

John
newguy



Joined: 24 Jun 2004
Posts: 1903

View user's profile Send private message

PostPosted: Thu Apr 10, 2014 10:26 am     Reply with quote

ezflyr wrote:
I just checked Digikey, and they don't sell anything else!


Just designed a board with this:
http://www.digikey.ca/product-detail/en/ECS-.327-6-34S-TR/XC1935CT-ND/3927393

Also previously designed a board with this:
http://www.digikey.ca/product-detail/en/ABS25-32.768KHZ-6-T/535-10240-1-ND/2218053
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Thu Apr 10, 2014 11:05 am     Reply with quote

Hi,

Sorry, I should have said "in a thru-hole package" as well..... The point remains, however, that he's got an 'odd' thru-hole footprint for the expected 'standard' 32.768 KHz watch crystal.

John
Ttelmah



Joined: 11 Mar 2010
Posts: 19346

View user's profile Send private message

PostPosted: Thu Apr 10, 2014 2:47 pm     Reply with quote

The package is not that unusual. HC49.
However the point is valid, since most HC49 32KHz crystals require larger load capacitors than the DS1307 wants.
Pulled a list from my supplier. Several 32K crystals in this format, but only one has the load capacitance required by the DS1307. The rest all required higher capacitance's, ranging up from 18pF....
40inD



Joined: 30 Jul 2007
Posts: 112
Location: Moscow, Russia

View user's profile Send private message

PostPosted: Thu Apr 10, 2014 10:57 pm     Reply with quote

I use cylindrical crystal with diameter 2mm
Ttelmah



Joined: 11 Mar 2010
Posts: 19346

View user's profile Send private message

PostPosted: Fri Apr 11, 2014 8:41 am     Reply with quote

In which case, why layout the board for HC49?. Stupid.
As others have said, look at the recommended layout, and get as close to this as you can. It is important. Manufacturer's don't make recommendations like 'avoid running tracks here', without good reason.
The crystal doesn't have to 'contact' the track underneath. There is enough capacitive coupling, for a high frequency signal to be picked up by the oscillator input.
Puzzled by your picture. Either this is from the bottom of the board, in which case the text would normally be reversed, or you have the chip reversed?.

Laid out properly, the DS1307, is reliable.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group