I recently purchase the DS1307 RTC breakout board and am having an issue. I have followed the tutorial and am using the code listed on this site. My RTC (even directly after reset) is always a few mins off. I am using the setting script listed on the site to set the clock to my computers time. I do understand that this clock will eventually become inaccurate, but i am confused as to why it is off immediately after resetting.
Here is the code I am using in the setup section of the sketch to set the clock
- Code: Select all
if (! RTC.isrunning()) {
Serial.println("RTC is NOT running!");
// following line sets the RTC to the date & time this sketch was compiled
RTC.adjust(DateTime(__DATE__, __TIME__));
}
has anyone else encountered this issue and have a fix?
Thanks