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
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.
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?