DS3231 high precision clock module program

With the rapid development of technology, some corresponding precision instruments have also come out. These instruments usually need to set an accurate clock to ensure the correct switching of time. The DS3231 is a low-cost, ultra-precise I2C real-time clock chip from Maxim/Dallas that provides better timing accuracy than ±2min/a over a range of temperatures, eliminating the need for crystal mounting during manufacturing. And wiring calibration process.

The DS3231 is a low-cost, high-precision I2C real-time clock (RTC) with an integrated temperature-compensated crystal oscillator (TCXO) and a 32.768kHz crystal. The crystal contains a battery input that remains accurate when the mains supply is disconnected. The integrated crystal oscillator increases the long-term accuracy of the device and reduces the number of components produced.

DS3231 high precision clock module program

The DS3231 is both provider and industrial temperature range in a 16-pin, 300 mil SO package. The RTC maintains seconds, minutes, hours, weeks, dates, months, and years. When encountering a month with less than 31 days, the month-end date will be automatically adjusted, including leap year compensation. The working format of the clock can be 24 hours or a 12-hour format with the -AM/PM indication. Two programmable calendar alarms and one programmable square wave output are provided. Address and data are transmitted bidirectionally via I2C. Monitor the VCC status with a precision, temperature-compensated voltage reference and comparator, detect power failures, provide a reset output, and automatically switch to the backup supply if necessary. In addition, the RST monitor pin can be used as a manual button input to generate an external reset signal.

The pin functions of the DS3231 are described as follows: 32kHz is the 32kHz frequency output; VCC is used for the DC pin of the main power supply; INT/SQW is the active low or square wave output; RST is the active low reset pin; No connection, external must be grounded; GND is ground; VBAT is standby power input; SDA is serial data input and output; SCL is serial clock input

Schematic:

DS3231 high precision clock module program

Module parameters:

1. Size: 38mm (length) * 22mm (width) * 14mm (height) 2. Weight: 8g

3. Working voltage: 3.3--5.5V

4. Clock chip: high precision clock chip DS3231

5. Clock accuracy: 0-40 °C range, accuracy 2ppm, annual error about 1 minute 6. With 2 calendar alarm clock 7. Programmable square wave output

8. The real-time clock generates seconds, minutes, hours, weeks, dates, months, and years, and provides leap year compensation valid until 2100

9. The chip has its own temperature sensor with an accuracy of ±3°C. 10. Memory chip: AT24C32 (storage capacity 32K)

11.IIC bus interface, the maximum transmission speed is 400KHz (when the working voltage is 5V)

12. Other IIC devices can be cascaded. The 24C32 address can be modified by short circuit A0/A1/A2. The default address is 0x57. 13. With rechargeable battery LIR2032, the clock will continue to move normally after the system is powered off.

Wiring instructions, taking Arduino uno r3 as an example:

SCL→A5

SDA→A4

VCC→5V

GND→GND

Home Lift

Through Floor Lift,Best Home Elevators,Wheelchair Lift For Home,Car Lift For Home Garage

XI'AN TYPICAL ELEVATOR CO., LTD , https://www.chinaxiantypical.com