-2

I've been trying to fix my ds3231. The issue was that it was spitting out random numbers for the time and data. I was told on Reddit that this most likely means that the repositories are corrupt and the only way to reset it would be to plug a valid number into every possible repository. Since then I gave up on that because I didn’t see it worth my time so I just bought a pack of 5 new DS3231’s. However even without writing anything onto them ever it’s spitting out the same corrupt numbers. I also tried running code without any DS3231 connected and got the same response. At this point, I think that the Arduinos internal time is corrupt as well. However, after looking around I’m not sure if that’s even a thing that can happen or how I would go about fixing that. As mentioned in my previous post I’m using the library by JChristensen however when troubleshooting I’ve gone through all the libraries that you can find out there. At this point, I’m not even sure if this is a hardware or a software problem. Any help would be greatly appreciated.Time that the RTC gives. Time on top date on bottomenter image description here The library that I have my code written around is the one by JChristensen This is the sketch used to set the time to the DS3231: https://github.com/JChristensen/DS3232RTC/tree/master/examples/SetSerial

  • 1
    Please show us the sketch you're using, and a schematic of the component connections. – VE7JRO Jul 11 at 20:57
  • Im using this to set time: github.com/JChristensen/DS3232RTC/tree/master/examples/… it worked in the past. I've also used a lot of other libraries to try and set the time as well. – Justin W Jul 11 at 21:21
  • 2
    "repositories are corrupt"? Those word simply do not make sense together in this context. Did you mean registers are corrupt? Just reset the RTC then. There is no time in the Arduino to get "corrupted". Most likely you have a mistake in your code, but since you don't show your code or your output it's impossible to tell. – Delta_G Jul 12 at 4:52
  • 1
    run the I2CScanner sketch. and try new hardware without any other devices wired to the board. did you set the time? – Juraj Jul 12 at 9:44
  • Thanks for all the downvotes! Huge help! I'm sorry about the wrong vocabulary I was just repeating what people told me on Reddit. I've tried to reset the RTC multiple times but the time: 7:231:0 and the date 2/62/56 just sticks even past a battery removal. This same code and hardware setup has worked in the past so I'm not sure what's up with it now. I gave up on the DS3231, now I'm just grabbing the time with the ESP from the NTP servers. This is the lib I'm using for that: github.com/G6EJD/ESP_Simple_Clock_Functions – Justin W Jul 12 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.