EmbDev.net

Forum: µC & Digital Electronics DS1307 SQWO wrong frequency


von Kristian S. (schellek)


Attached files:

Rate this post
useful
not useful
Hello together,

I've designed a PCB which I am currently testing. I soldered on a DS1307 
RTC which I desoldered from an old project. It is driven by a 2 mm x 1.2 
mm 32,768 kHz Crystal (6pF). Communication over I2C works flawless, 
however when it comes to using the squarewave output, things get worse.
I don't know why, but the frequency of the SQW pin not even close to the 
desired 1 Hz. Also when I supply the PCB with 5V from the Debugger (by 
bypassing the VREG) and unplug it and plug it in again the time is lost. 
By powering of the VREG, the time is kept.
Did someone face a similar issue?

Squarewave output and Schematic attached.

Best
schellek

von Richard (Guest)


Rate this post
useful
not useful
https://datasheets.maximintegrated.com/en/ds/DS1307.pdf

p.6: Connections for Standard 32.768kHz Quartz Crystal. The internal 
oscillator circuitry is designed for operation with a crystal having a 
specified load capacitance (C L ) of 12.5pF.

von K.S. (Guest)


Rate this post
useful
not useful
you could try to measure the xtal frequency with a x100 or x10 probe on 
Pin X2 (not on X1, this is the input of the internal inverter; and a x1 
probe has a too low impedance).

Then you could maybe post your initialisation code to check that you 
didn't set any unsupported bits in the config register.

Kristian S. wrote:
> Also when I supply the PCB with 5V from the Debugger (by
> bypassing the VREG) and unplug it and plug it in again the time is lost.
> By powering of the VREG, the time is kept.
need more information on that problem, maybe post the whole schematic 
and the pcb?

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.