Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for DS3232 #248

Open
jaggil opened this issue Nov 19, 2021 · 0 comments
Open

Add support for DS3232 #248

jaggil opened this issue Nov 19, 2021 · 0 comments

Comments

@jaggil
Copy link

jaggil commented Nov 19, 2021

Hello,
Could you please add support for the DS3232 model?
It seems that it could not be very complicated, since it is the same as the DS3231 model but includes 236 Bytes of NVRAM.
It would only be to add the following to the current one for the DS3231:
uint8_t readnvram (uint8_t address);
void readnvram (uint8_t * buf, uint8_t size, uint8_t address);
void writenvram (uint8_t address, uint8_t data);
void writenvram (uint8_t address, uint8_t * buf, uint8_t size);

Thanks in advance, regards
Notes:
The DS3232 is similar to the DS3231. However, it has the following modifications:
1.- The DS3232 has 236 bytes of battery-backed SRAM.
2.- The addition of the I²C timeout function. This limits the minimum frequency at which the I²C interface can be operated.
3.- 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.
4.- On battery switchover, the BB32kHz bit can be used to selectively enable / disable the 32kHz output.
5.- 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.
6.- 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant