Shop OBEX P1 Docs P2 Docs Learn Events
DS3231 Real Time Clock I2C Demo - posted as a P2 Quick Byte — Parallax Forums

DS3231 Real Time Clock I2C Demo - posted as a P2 Quick Byte

Ken GraceyKen Gracey Posts: 7,392
edited 2021-01-24 20:14 in Propeller 2
https://www.parallax.com/ds3231-real-time-clock-i2c-demo/

We can thank JonnyMac for the code example, as usual.

Ken Gracey

Comments

  • You may want to add a note to the Quick Byte that the time and date only need to be set once if the battery is installed in the module. Comment-out the call to initialize_rtc() when the clock is already set to the correct time and date.
  • Hey Jon, back in Tachyon on the P1 I had one common driver for I2C RTCs since there is hardly any difference when it comes to handling the time and date, especially after masking some of the unneeded bits. Without going into all the other details I was just thinking that you could make your Quick Byte a bit more universal to handle most common I2C RTC chips. There were so many different I2C RTC drivers in the past and there was no real need for it. Perhaps your driver could be entitled "UNIVERSAL I2C REAL TIME CLOCK" or something and next time somebody requests a driver for a chip, well, there it is already.

    I was thinking about this because I'm updating my RV-3028 I2C driver in TAQOZ to allow for other chips on other boards just like Tachyon did.

  • thanks I'm enjoying the quick bytes

    Nick

  • I have DS323x variants deployed in several long-term projects. If you adjust the aging register carefully after reflow, these things can be tweaked to gain/lose less than 1 sec every 14 days. I use the PPS output from a GPS module and the P2 GetCnt() function to achieve a very tight spec. Its really amazing how far you can push these RTCs.

Sign In or Register to comment.