I have tried everything and I can't understand this. I have a ds1307 rtc, the right crystal and a battery. Everything apparently works fine.
When I try the battery, to see if everything works, I detach the VCC cable from the pin8 on the ds1307 and when I attach it again I see that the battery works, because the time is exact.
Looks like ok BUT.. When I detach the +5 cable from the arduino (meaning that breaks the connection with pin 8 VCC, 5 SDA,6 SCL) and I attach it again, most of the times (but not every time) the RTC hangs and show always the time when i gave again the +5. (Looks like hanging in the exact moment that I put the +5)
I am working on this from many hours, without understanding why it stop working...
Thank you for help!