RTClib icon indicating copy to clipboard operation
RTClib copied to clipboard

Add support for DS3232

Open jaggil opened this issue 3 years ago • 1 comments

The DS3232, an accurate I²C RTC with integrated crystal and SRAM, is similar to the DS3231. However, it has the following modifications:

The DS3232 has 236 bytes of battery-backed SRAM.

The addition of the I²C timeout function. This limits the minimum frequency at which the I²C interface can be operated.

The 32kHz output driver is changed to push-pull. This removes the need for an external pullup resistor, resulting in space savings. This also allows faster edges on the clock, along with power savings in the device.

On battery switchover, the BB32kHz bit can be used to selectively enable/disable the 32kHz output.

The 32kHz output on the DS3232 is designed to drive low when turned off. The DS3231 is switched to a high impedance state when switched off.

On the DS3232, the temperature-conversion rate can now be controlled using 2 CRATE bits. These bits control the sample rate of the device. The sample rate determines how often the temperature sensor makes a conversion and applies compensation to the oscillator. Decreasing the sample rate decreases the overall power consumption by decreasing the frequency at which the temperature sensor operates.

jaggil avatar Dec 11 '21 12:12 jaggil

Perhaps the maintainer can comment on this PR?

thijstriemstra avatar Jun 03 '22 17:06 thijstriemstra