You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good day Paul,
I've initially started working on DS1307 with Your library, that seems to be well coded, but due to some strange behavior I moved on to Adafruit RTCLib. On contrary RTCLib does not process the "Day of week" from DS1307 chip at all, but drops the register's value.
Having that on mind, I went back to Your code to find out what's wrong with it, here's the code I've run at the beginning on my circuit self-check: int rtc_test(void) { if (!RTC.chipPresent()) return RTC_ERR_MISSING; if (!RTC.isRunning()) return RTC_ERR_NOT_RUNNING; //battery out? return RTC_OK; }
and I always ended up with RTC_ERR_MISSING.
Looking through Your code I've found, that I can't calll chipPresent() method prior calling RTC.read(); first. In general, to avoid confusions like my own, perhaps You could sort this out so that chipPresent() method would be independent of RTC.read() one and return the right value.
Cheers and thanks for the library
Mike
The text was updated successfully, but these errors were encountered:
https://github.com/PaulStoffregen/DS1307RTC/blame/c2590c00332bb952ee3b6b5d10615df47509935b/DS1307RTC.cpp#L67
Good day Paul,
I've initially started working on DS1307 with Your library, that seems to be well coded, but due to some strange behavior I moved on to Adafruit RTCLib. On contrary RTCLib does not process the "Day of week" from DS1307 chip at all, but drops the register's value.
Having that on mind, I went back to Your code to find out what's wrong with it, here's the code I've run at the beginning on my circuit self-check:
int rtc_test(void) { if (!RTC.chipPresent()) return RTC_ERR_MISSING; if (!RTC.isRunning()) return RTC_ERR_NOT_RUNNING; //battery out? return RTC_OK; }
and I always ended up with RTC_ERR_MISSING.
Looking through Your code I've found, that I can't calll
chipPresent()
method prior callingRTC.read();
first. In general, to avoid confusions like my own, perhaps You could sort this out so that chipPresent() method would be independent of RTC.read() one and return the right value.Cheers and thanks for the library
Mike
The text was updated successfully, but these errors were encountered: