I have a ATMega 328P on a breadboard running off the internal oscillator connected to a DS1305 RTC as shown in the schematic. I am using the library from Redirect Notice.
All I get out as dates is either 00/00/2000 12:00:00 AM or 128/128/20165 128:128:128.
I have been at this for several days and I am stuck for ideas. Could it be a duff DS1305? if so how do I tell?
You left VccIF open and the "Typical Circuit" in the datasheet shows it connected to +5V.
If you only have one power source you should use Vcc2 with Vbat and Vcc1 grounded. You have power on Vcc1 and have Vbat and Vcc2 grounded.
Interesting...
To the OP, totally I have 10 i2c DS1305's in my draw i spent days trying to set and read a time including 3v (from Arduino's 3v supply) to give it 2 voltage sources... still no luck... (maybe gnd is not tied?) anyway a week late i figured all 10 of them were bad lol
.
"If you only have one power source you should use Vcc2 with Vbat and Vcc1 grounded. You have power on Vcc1 and have Vbat and Vcc2 grounded."
Thanks for that, I obviously did read the datasheet ... lots; but missed that VccIf connection. It's perhaps a bit of an oversight in the datasheet that the description for that pin doesn't state it should be tied to Vcc if a different SDO level is not requried.
Backup Power Supply. This is the secondary power supply pin. In systems
using the trickle charger, the rechargeable energy source is connected to this
pin.
and the typical circuit has it connected to ground. Vcc2 is there to trickle charge a back-up battery and then use that power if the supply to Vcc1 fails.