Shopping Bag

0 item(s) in cart/ total: $0    view cart
Grove - RTC

Grove - RTC

review
0
0
5
Your Price: $6.90
Out of Stock
Part Number:DEV-0017
The RTC module is a member of Twig. It is based on the clock chip DS1307 which supports the I2C protocol. It uses a Lithium cell battery (CR1225). The clock/calendar provides seconds, minutes, hours, day, date,month, and year information. The end of the month date 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 AM/PM indicator. 

Note: Battery is not included.

Features
  • Real-Time Clock (RTC) counts seconds,minutes, hours, date of the month, month,day of the week, and year with Leap-Year compensation valid up to 2100
  • 56-Byte, Battery-Backed, Nonvolatile (NV)RAM for data storage
  • I2C serial interface
  • 5V DC supply
  • Programmable Square-Wave output signal
  • Automatic Power-Fail detect and switch circuitry
  • Consumes less than 500nA in Battery-Backup Mode with Oscillator Running
For all Grove users (especially beginners), we provide you guidance PDF documents. Please download and read through Preface - Getting Started and Introduction to Grove before your using of the product.

Github - Library (Suli)
  • Github - Grove_RTC

    From Seeedstudio Wiki

    Introduction

    The RTC module is based on the clock chip DS1307, which supports the I2C protocol. It utilizes a Lithium cell battery (CR1225). The clock/calendar provides seconds, minutes, hours, day, date, month, and year. The end of the month date is automatically adjusted for months with fewer than 31 days, including corrections for leap years. The clock operates in either the 24-hour or 12-hour format with AM/PM indicator. And it is valid up to 2100. In order to gain a robust performance, you must put a 3-Volt CR1225 lithium cell in the battery-holder. If you use the primary power only, the module may not work normally, because the crystal may not oscillate.

    Previous Version: V0.9b
    Note: The battery is not included.
    Model:SEN12671P




    Specification

    • PCB Size: 2.0cm*4.0cm
    • Interface: 2.0mm pitch pin header
    • IO Structure: SCL,SDA,VCC,GND
    • ROHS: YES
    • VCC:4.5~5.5V
    • Logic High Level Input :2.2~VCC+0.3 V
    • Logic Low Level Input :-0.3~+0.8 V
    • Battery Voltage:2.0~3.5 V




    Demonstration

    The following sketch demonstrates a simple application of setting the time and reading it out.

    • Connect the module to the I2C Interface of Grove- Base Shield.
    • Plug Grove- Base Shield into Arduino.
    • Connect Arduino to PC via a USB cable.
    • Download the library File:RTC Library
    • Unzip it into the libraries file of Arduino IDE by the path: ..\arduino-1.0\libraries.
    • Open the code directly by the path:File -> Example ->RTC->SetTimeAndDisplay.
     
    #include <Wire.h>
    #include "DS1307.h"
    
    DS1307 clock;//define a object of DS1307 class
    void setup()
    {
    	Serial.begin(9600);
    	clock.begin();
    	clock.fillByYMD(2013,1,19);//Jan 19,2013
    	clock.fillByHMS(15,28,30);//15:28 30"
    	clock.fillDayOfWeek(SAT);//Saturday
    	clock.setTime();//write time to the RTC chip
    }
    void loop()
    {
    	printTime();
    }
    /*Function: Display time on the serial monitor*/
    void printTime()
    {
    	clock.getTime();
    	Serial.print(clock.hour, DEC);
    	Serial.print(":");
    	Serial.print(clock.minute, DEC);
    	Serial.print(":");
    	Serial.print(clock.second, DEC);
    	Serial.print("	");
    	Serial.print(clock.month, DEC);
    	Serial.print("/");
    	Serial.print(clock.dayOfMonth, DEC);
    	Serial.print("/");
    	Serial.print(clock.year+2000, DEC);
    	Serial.print(" ");
    	Serial.print(clock.dayOfMonth);
    	Serial.print("*");
    	switch (clock.dayOfWeek)// Friendly printout the weekday
    	{
    		case MON:
    		  Serial.print("MON");
    		  break;
    		case TUE:
    		  Serial.print("TUE");
    		  break;
    		case WED:
    		  Serial.print("WED");
    		  break;
    		case THU:
    		  Serial.print("THU");
    		  break;
    		case FRI:
    		  Serial.print("FRI");
    		  break;
    		case SAT:
    		  Serial.print("SAT");
    		  break;
    		case SUN:
    		  Serial.print("SUN");
    		  break;
    	}
    	Serial.println(" ");
    }
    
    • Set the time. Put function arguments change to current date/time. The attention should be paid to the arguments format.
            clock.fillByYMD(2013,1,19);//Jan 19,2013
    	clock.fillByHMS(15,28,30);//15:28 30"
    	clock.fillDayOfWeek(SAT);//Saturday
    • Upload the code.
    • Open the serial monitor to see the result.
     
    RTC result.jpg

    The output time is changing like the clock.

  • Related Items

    Recently Viewed Items