Continue to Site

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.

[SOLVED] Ds1307's oscillator not running

Status
Not open for further replies.

Anthony_

Junior Member level 2
Junior Member level 2
Joined
Jul 29, 2013
Messages
23
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Location
Zulia-Venezuela
Activity points
175
hi all! i've been struggling to make a ds1307 work with a 16f877a, i interfaced then very well, i set the ds1307 to output a square wave from SQW pin, but it doenst work with its crystal (i connected a 32khz crystal in ds1307's pins X1 and X2), afterwards i started playing with it and connected the ds1307's X1 pin (i left the X2 floating) with the 16f877a's OSC2/CLKOUT pin and the RTC started working perfectly giving the 1 HZ Square wave tru SQW pin output, the pic 16f877a is also working with a 32 khz crystal ( LP mode). so the RTC works perfectly with the pic's oscillator not its

with all this i assume both ics are interfaced correctly and the DS1307 is configured properly for my purpose of producing a 1HZ wave, the Vcc is 5V and Vbat is 3V, the pull up resistors of SCL and SDA lines are 4,7K each (i tried with 10k but same result), so what could it be? Ds1307's oscillator damaged?

here the sch.
DS1307RTC.png
 

What type of pcb layout do you have?
If it is a breadboard or protoboard the capacitance may be too high.

long wires also act like ariels so you may have excessive noise causing the frequency to be swamped and the chip to not start.
 
indeed im using a protoboard! your point about the capacitance seems to be the problem, when the crystal is connected the ds1307 oscillator doesnt do anything (im not using long wires the crystal is too close to ic), but i disconnected the crystal from the breadborad and used short wires to connect it again (holding it in my hands) and the oscillator started running slowly, looks like the crystal "doesnt want" to be atached in the breadboard

- - - Updated - - -

crap! now the RTC started oscillating slowly when i touch X1 pin (no crystal) :S

- - - Updated - - -

look the real circuit, in this the crystal is directly atached in ds1307's X1 and X2 pins (not working), in the second one i bridged the ds1307 X1 pin with the 16f877a 's OSC2 pin and its working great!

1236936_10151854628770801_1510278281_n.jpg1186718_10151854628270801_2031476810_n.jpg
 

hello,
i had the same problem,
i solved it by replacing the 32khz quartz by another wich meet the datasheet specifications
about capacitor value around the quartz ( osillator).
i had 5 quartz comming from the same supplyer, but only 2 meet the spec,and run ok
 
guys thanks for your comments and support! i replaced the DS1307 IC for a new one and it's working perfectly! the good thing about this week being dedicated to solve my problem was i learnt a lot about using RTC's, i assumed the first one was damaged, once again thanks for everyone who answered my help request!
 

guys thanks for your comments and support! i replaced the DS1307 IC for a new one and it's working perfectly! the good thing about this week being dedicated to solve my problem was i learnt a lot about using RTC's, i assumed the first one was damaged, once again thanks for everyone who answered my help request!

Please mentioned subject line with Solved so that other can refer it
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top