Gravity__I2C_SD2405_RTC_Module_SKU__DFR0469-DFRobot

I2C SD2405 RTC Module

Introduction

We're glad to introduce a new member in Gravity family: Gravity I2C SD2405 RTC module. This is an extremely accurate I2C real-time clock (RTC) with crystal compensation, inner chargeable battery. The SD2405AL is available in industrial temperature ranges. The SD2405AL is dual power supply system. When the primary power supply goes down to an assigned value or resumes from low power, the system can switch between the primary power supply and battery automatically. Even there is no external power, it can still work for 5-8 years, 1uA ultra-low power consumption (inner battery, Ta=25°C). The SD2405AL can generates various periodic interrupt clock pulses lasting for long period (one year), and three alarm interrupts can be made by year, month, date, days of the week, hours, and minutes, seconds. It also provides a selectable 32.768KHz-1Hz clock output for an external MCU. The product incorporates a time trimming circuit that adjusts the clock with higher precision by adjusting any errors in crystal oscillator frequencies based on signals from the CPU. A 12-bytes general SRAM is implemented in the SD2405AL. Gravity SD2405 RTC can work as data logger, timer alarm clock and other time application. It is an ideal choice for timing project.

Specification

Board Overview

Num Label Description
1 Gravity Interface SDA: IIC Data
SCL: IIC Clock
GND: GND
VCC: 3.3~5V
2 XH2.54 Pins SDA: IIC Data
SCL: IIC Clock
GND: GND
VCC: 3.3~5V
INT: Interrupt

Tutorial

In this tutorial, you can set and read time.

Requirements

Connection Diagram

Sample Code

Please download Arduino RTC library, Install the GravityRtc library file.How to install Libraries in Arduino IDE

Note:
//rtc.adjustRtc(F(DATE), F(TIME)); //Set the RTC time automatically. Please comment it after you have set time successfully
//rtc.initRtc(2017,6,19,1,12,7,0); //Set Time: 2017/June/19th/Monday/12:07:0 am. Please comment it after you have set time successfully

#include "GravityRtc.h"
#include "Wire.h"

GravityRtc rtc;     //RTC Initialization

void setup() {
  Serial.begin(9600);

  rtc.setup();

//Set the RTC time automatically: Calibrate RTC time by your computer time
  rtc.adjustRtc(F(__DATE__), F(__TIME__));

  //Set the RTC time manually
  //rtc.adjustRt(2017,6,19,1,12,7,0);  //Set time: 2017/6/19, Monday, 12:07:00
}

void loop() {
  rtc.read();
  //*************************Time********************************
  Serial.print("   Year = ");//year
  Serial.print(rtc.year);
  Serial.print("   Month = ");//month
  Serial.print(rtc.month);
  Serial.print("   Day = ");//day
  Serial.print(rtc.day);
  Serial.print("   Week = ");//week
  Serial.print(rtc.week);
  Serial.print("   Hour = ");//hour
  Serial.print(rtc.hour);
  Serial.print("   Minute = ");//minute
  Serial.print(rtc.minute);
  Serial.print("   Second = ");//second
  Serial.println(rtc.second);
  delay(1000);

}

Expected Results

FAQ

For any questions, advice or cool ideas to share, please visit the DFRobot Forum.

More Documents