Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

DS1307 real time clock is working too slow

Status
Not open for further replies.

thuvu

Member level 3
Joined
Jan 3, 2006
Messages
65
Helped
9
Reputation
18
Reaction score
3
Trophy points
1,288
Activity points
1,819
ds1307 not ocillate

Hallo,

I am working with DS1307 and I am trying to create with AVR,LCD a clock.
The problem is that every few hours , I notice that it is 1-2minutes slow.

What is the problem? I am using the crystal which is proposed by the manufacturer for DS1307.

Thanks
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,432
Re: DS1307 real time clock

If it was one second (or less) every day, I woudn't bother, as you can't do much about that (that's the beauty of this IC) ..

However, in your case, you have the following options:

- replace the DS1307 .. possible solution ..
or
-replace the crystal .. very unlikely solution ..
or
double check your PCB layout around the DS1307-crystal area .. the most likely reason/solution ..

Regards,
IanP
 

abu_zakan

Junior Member level 1
Joined
Jul 30, 2003
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Middle East
Activity points
134
Re: DS1307 real time clock

You can get such a problem in case you supply vbat above 3.5v. If this is the case then try not exeed 3v.

I had the same.
 

philba

Full Member level 2
Joined
Jan 26, 2006
Messages
132
Helped
13
Reputation
26
Reaction score
1
Trophy points
1,298
Activity points
3,102
DS1307 real time clock

There are several reasons for clocks/oscillators being off.

- wrong load cap crystal used. as I recall, the 1307 wants 12.5 pf. If you used, say, a 6 pf crystal, it would oscillate at a different frequency and your timing would be off. I suspect this is your problem. there is an application note on maxim site about dallas RTCs and crystal accuracy : application note 58.
- noise near the crystal pins. it's quite common to see this. the noise will get counted as oscillations and the timer will run fast. the datasheet has good info on layout.
- parasitic capacitance. did you build in a "guard ring" around your crystal traces?
- are you using a solderless breadboard? if so, it is going to be very hard to solve the problem because of the large amount of capacitance and noise that it encourages.

Phil
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top