Recently i have played the RTC DS1307 and works fine with continuous 5V supply.
However, when i try to connect the backup battery and cut the 5V supply for one day...and then give the 5V supply again...discovered that the clock has been slowed down....
what are the possible reasons for such problem??
Remark that i have shared the I2C pins with EEPROM. The crystal is just soldered beside DS1307...
Hi;
sharing the I2c bus with eprom and rtc does not matter at all as u can connect 128 devices to this bus. the distance of the crystal oscillator and RTC also does not matter.
I will suggest you to check the voltage of the backup battery while it is externally powered on and after u switch the power off. RTC works fine even with 3 to 3.3 V
If the time is decreased after 24hours then change the crystal oscillator.
I suppose you are using watch crystal. Since they are locally manufactured, sometimes their stability causes these problem. and put the same capacitor for the RTC crystal 32.768KHz.
Recently i have played the RTC DS1307 and works fine with continuous 5V supply.
However, when i try to connect the backup battery and cut the 5V supply for one day...and then give the 5V supply again...discovered that the clock has been slowed down....
what are the possible reasons for such problem??
Remark that i have shared the I2C pins with EEPROM. The crystal is just soldered beside DS1307...
1. The 2 pull-up resistors: soldering, right value, etc.
2. Check the DS1307 Datasheet. In there, you found an advice about the PCB design around the DS1307 RTC Chip.
3. Check the 3V backup battery.
4. The power supply. check the VCC pin of the RTC. Don't forget the Filter Cap.