Product | Shields | RTC DS1307 Shield
RTC DS1307 Shield
RTC DS1307 Shield
42235
More than 10
 
US$9.98 Loading ...
 
Share/Save/Bookmark


Arduino RTC DS1307 Shield


 
DS1307 is a real-time chip of DALLAS company,which adopt I2C protocal to communicate with SCM, and there was this kind interface on Arduino, therefore is very convenient to link with each other. DS1307 have a programmable waveforms output, it can be used to drive LED lights, or trigger a certain event as a break off, but be careful when you use it to take some kind of high power module.

This V3 have the same useage as V1.0.

We design the real clock module to pin out the I2C interface of Ds1307 and programmable waveforms output interface SQW are connected, but usually we will only use the I2C interface to realize basic set the clock/read function. Note, this module must be installed on the battery can work normally. The battery is button batteries (type CR1220), the positive upward :


 

Note : this shield don't include the batteries

This module communicate with Arduino through the I2C interface.It will be better to use with Arduino-Sensor-Shield-V4.0 and the Arduino-I2C-COM-Cable.

This module can be used with Arduino Special Sensor Shield V4.0.

You can do some simple design about it,it support“plug and play".

In circuit connection, we can use Arduino sensor shield V4 board, but set the corresponding jumpers wires to IIC position :



Then connect with Arduino Special Sensor Shield V4.0.




Download the DS1307 Library 1 or Library 2

then uncompress DS1307 Library 1 or Library 2 into libraries of Arduino 0018 and restart ;

Testing Code :

#include <WProgram.h>
#include <Wire.h>
#include <DS1307.h> // written by  mattt on the Arduino forum and modified by D. Sjunnesson

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

  RTC.stop();
  RTC.set(DS1307_SEC,1);        //set the seconds
  RTC.set(DS1307_MIN,23);     //set the minutes
  RTC.set(DS1307_HR,12);       //set the hours
  RTC.set(DS1307_DOW,4);       //set the day of the week
  RTC.set(DS1307_DATE,15);       //set the date
  RTC.set(DS1307_MTH,7);        //set the month
  RTC.set(DS1307_YR,10);         //set the year
  RTC.start();

}

void loop()
{

  Serial.print(RTC.get(DS1307_HR,true));  //read the hour and also update all the values( true)
  Serial.print(":");
  Serial.print(RTC.get(DS1307_MIN,false));//read minutes without update (false)
  Serial.print(":");
  Serial.print(RTC.get(DS1307_SEC,false));//read seconds
  Serial.print("      ");                 // some space for a more happy life
  Serial.print(RTC.get(DS1307_DATE,false));//read date
  Serial.print("/");
  Serial.print(RTC.get(DS1307_MTH,false));//read month
  Serial.print("/");
  Serial.print(RTC.get(DS1307_YR,false)); //read year 
  Serial.println();

  delay(1000);
}



The Result : 

Download the code into Arduino and run, you can watch the result through serial window :





Click to download the test code

Click to download the schematic diagram

Write a review
*Review title
Please enter subject.
*Your review
Please enter review.
*Rating
(Click star icon to comment)
 
Display name
*Enter security code

CAPTCHA

Please enter code
Loading ...

Best Sellers
Newsletter

Join our newsletter today, to get latest product information and promotion code.

Join
Loading ...