The DS3231M real time clock is a low-cost, extremely accurate, I2C realtime clock (RTC). The device incorporates a battery input and maintains accurate timekeeping when main power to the device is interrupted. The integration of the microelectromechanical systems (MEMS) resonator enhances the long-term accuracy of the device and reduces the piecepart count in a manufacturing line. The DS3231M is available in the same footprint as the popular DS3231 RTC.
Arduino library for accessing the maxim integrated . This clock requires no external components and with an internal temperature-compensated oscillator it is extremely accurate, to within ±5ppm or ±0.432 Second/Day. The library allows setting the date/time and alarms as well as accessing other information on the DS3231M.
The DS3231 RTC is also supported by this library, including additional functionality of being able to set the frequency of the square wave output.
The DS3231M is available as a SO8 or SO16 package and runs on both 3V and 5V systems. It has two alarms and also battery backup circuitry and requires no external crystals/oscillators or capacitors to run.
A detailed description of the library along with further details are available at the GitHub DS3231M Wiki. This includes wiring information and sample sketches that illustrate the library and it's functionality.