What happens if you leave the battery inserted? Can you then reprogram the time?
What happens if you leave the battery inserted? Can you then reprogram the time?
Dave
Always wear safety glasses while programming.
No... The LCD initializes, then displays "TEST" on startup or reset (both work fine, even with battery inserted), then clears the LCD and displays the time in a simple loop. Function is consistent regardless of battery, except the display remains fixed at 04:04:04 with the battery in place.
Reprogramming sets the time registers to the startup value, but 04:04:04 continues to be displayed until the battery is removed.
In exercising your suggestion, Dave, it appears that the clock continues to function correctly (and accurately) while the display is erroneous; rather it is some anomaly in the I2C that affects the output or display! What is the likelihood that different (lower? Higher?) I2C pull-ups would resolve this?
EDIT: Appending or propending text before or after the time displays as expected as well.
Last edited by Amoque; - 30th August 2014 at 16:15.
Ok, mystery solved.
It appears that noise, capacitance, or competing residual signal on the breadboard was causing issue. Running the voltage supply directly to the circuit board resolves all issues. Thanks all - and you particularly you Dave, for putting me on the right track.
Ok, after further research, it appears related to battery voltage. The "new" battery I purchased reads over 4 volts. Just a head-up to others: something to look at if you're getting wonky readings from your DS RTC. I clipped a high draw LED to it for a bit - works flawlessly now. Sorry for the "Much ado about nothing."
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Very interesting. I did not know about DS1370 battery voltage sensitivity. I used long-life CR 1620 for 10 year clock service and never checked battery voltages with a meter. Something to consider in the future.
I've seen this problem before. The resolution is in the data sheet section regarding Vbat. This is what it says
Hope that helpsFrom http://datasheets.maximintegrated.com/en/ds/DS1307.pdf page 6
Backup Supply Input for Any Standard 3V Lithium Cell or Other Energy Source. Battery voltage must be held between the minimum and maximum limits for proper operation.
Diodes in series between the battery and the VBAT pin may prevent proper operation. If a backup supply is not required, VBAT must be grounded. The nominal power-fail trip point (VPF) voltage at which access to the RTC and user RAM is denied is set by the internal circuitry as 1.25 x VBAT nominal. A lithium battery with 48mAh or greater will back up the DS1307 for more than 10 years in the absence of power at +25°C
Bookmarks