受晶片供應影響,PI / micro:bit / Jetson供貨及價格較為浮動,敬請見諒。

DS3231 AT24C32 時鐘存儲模組 Clock Module


DS3231 AT24C32 高精度時鐘模組 for Arduino IIC 儲存模組


貨號: CM-002 分類: , 標籤: , , , , ,


DS3231 AT24C32 高精度 時鐘模組 for Arduino IIC 儲存模組








■接線說明(以Arduino uno r3為例)

The DS3231 is a low-cost, extremely accurate I2C real-time clock (RTC) with an integrated temperaturecompensated crystal oscillator (TCXO) and crystal. The device incorporates a battery input, and maintains accurate timekeeping when main power to the device is interrupted. The integration of the crystal resonator enhances the long-term accuracy of the device as well as reduces the piece-part count in a manufacturing line.

The DS3231 is available in commercial and industrial temperature ranges, and is offered in a 16-pin, 300-mil SO package.

The RTC maintains seconds, minutes, hours, day, date, month, and year information. The date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with an AM/PM indicator. Two programmable time-of-day alarms and a programmable square-wave output are provided. Address and data are transferred serially through an I2C bidirectional bus. A precision temperature-compensated voltage reference and comparator circuit monitors the status of VCC to detect power failures, to provide a reset output, and to automatically switch to the backup supply when necessary. Additionally, the RST pin is monitored as a pushbutton input for generating a μP reset.

Key Features
Highly Accurate RTC Completely Manages All Timekeeping Functions
Real-Time Clock Counts Seconds, Minutes, Hours, Date of the Month, Month, Day of the Week, and Year, with Leap-Year Compensation Valid Up to 2100
Accuracy ±2ppm from 0°C to +40°C
Accuracy ±3.5ppm from -40°C to +85°C
Digital Temp Sensor Output: ±3°C Accuracy
Register for Aging Trim
Active-Low RST Output/Pushbutton Reset Debounce Input
Two Time-of-Day Alarms
Programmable Square-Wave Output Signal
Simple Serial Interface Connects to Most Microcontrollers
Fast (400kHz) I2C Interface
Battery-Backup Input for Continuous Timekeeping
Low Power Operation Extends Battery-Backup Run Time
3.3V Operation
Operating Temperature Ranges: Commercial (0°C to +70°C) and Industrial (-40°C to +85°C)
Underwriters Laboratories® (UL) Recognized


VCC -> Arduino 5V

GND -> Arduino GND

SCL -> SCL or A5

SDA -> SDA or A4



函數庫下載 http://www.rinkydinkelectronics.com/library.php?id=73


// DS3231_Serial_Easy
// Copyright (C)2015 Rinky-Dink Electronics, Henning Karlsen. All right reserved
// web: http://www.RinkyDinkElectronics.com/
// A quick demo of how to use my DS3231-library to 
// quickly send time and date information over a serial link
// To use the hardware I2C (TWI) interface of the Arduino you must connect
// the pins as follows:
// Arduino Uno/2009:
// ----------------------
// DS3231:  SDA pin   -> Arduino Analog 4 or the dedicated SDA pin
//          SCL pin   -> Arduino Analog 5 or the dedicated SCL pin
// Arduino Leonardo:
// ----------------------
// DS3231:  SDA pin   -> Arduino Digital 2 or the dedicated SDA pin
//          SCL pin   -> Arduino Digital 3 or the dedicated SCL pin
// Arduino Mega:
// ----------------------
// DS3231:  SDA pin   -> Arduino Digital 20 (SDA) or the dedicated SDA pin
//          SCL pin   -> Arduino Digital 21 (SCL) or the dedicated SCL pin
// Arduino Due:
// ----------------------
// DS3231:  SDA pin   -> Arduino Digital 20 (SDA) or the dedicated SDA1 (Digital 70) pin
//          SCL pin   -> Arduino Digital 21 (SCL) or the dedicated SCL1 (Digital 71) pin
// The internal pull-up resistors will be activated when using the 
// hardware I2C interfaces.
// You can connect the DS3231 to any available pin but if you use any
// other than what is described above the library will fall back to
// a software-based, TWI-like protocol which will require exclusive access 
// to the pins used, and you will also have to use appropriate, external
// pull-up resistors on the data and clock signals.


// Init the DS3231 using the hardware interface
DS3231  rtc(SDA, SCL);

void setup()
  // Setup Serial connection
  // Uncomment the next line if you are using an Arduino Leonardo
  //while (!Serial) {}
  // Initialize the rtc object
  // The following lines can be uncommented to set the date and time
  //rtc.setDOW(WEDNESDAY);     // Set Day-of-Week to SUNDAY
  //rtc.setTime(12, 0, 0);     // Set the time to 12:00:00 (24hr format)
  //rtc.setDate(1, 1, 2014);   // Set the date to January 1st, 2014

void loop()
  // Send Day-of-Week
  Serial.print(" ");
  // Send date
  Serial.print(" -- ");

  // Send time
  // Wait one second before repeating :)
  delay (1000);