I2C RTC DS1307 AT24C32 Real Time Clock For Arduino and Raspberry Pi

I2C RTC DS1307 AT24C32 Real Time Clock For Arduino and Raspberry Pi
Brand: Giga
Product Code: I2CRTCDS1307AT24C32
Availability: 8
Price: R49.00
Ex Tax: R49.00
Qty:     - OR -   Add to Wish List
Add to Compare

I2C RTC DS1307 AT24C32 Real Time Clock For Arduino Raspberry Pi

What it is:
The DS1307 RTC is a chip that keeps time. It keeps track of the hour, minute, second, day, month, and year. It runs off of it's own battery, so even if the alarm clock is not plugged in, the RTC will keep the current time. The lithium ion battery included with the DS1307 board should last a couple years.


Arduino Tiny I2C RTC DS1307 AT24C32 Real Time Clock module+board for AVR ARM PIC


  • I2C interface
  • DS1307 based RTC with LIR2032 battery (Battery included)
  • Backup by AT24C32 32Kbit
  • DS1307,AT24C32 can work singleness
  • Dimention: 28x25x8.4mm
  • Weight:6.3g(include Battery)

How to hook it up:
Solder wires to Gnd, Vcc, Sda, and Scl. Gnd should connect to ground, Vcc should connect to the Arduino's built in 5V supply, Sda should connect to A4 (analog pin 4), and Scl should connect to A5 (analog pin 5).

Programming the RTC:
You need to run a program to set the time on the RTC to initialize it. I used the DS1307RTC library and the Time library to program my DS1307.

Arduino DS1307RTC library can be found at:

In the DS1307RTC library examples folder there should be a program called "SetTime". Run this program to set the time of your RTC to the current time on your computer. You can then run the ReadTest example to make sure that the time was set.

Basic Usage

Reads the current date & time as a 32 bit "time_t" number. Zero is returned if the DS1307 is not running or does not respond.
Sets the date & time, using a 32 bit "time_t" number. Returns true for success, or false if any error occurs.;
Read the current date & time as TimeElements variable. See the Time library for TimeElements details. Returns true on success, or false if the time could not be read.
Sets the date & time, using a TimeElements variable. Returns true for
Returns true if a DS1307 compatible chip was present after using the 4 functions. If an error occurs, this can be used to distinguish between a DS1307 that is not running vs no chip connected at all.
Example Program

DS1307RTC includes 2 examples, to read or set the time.
You can open this example from File > Examples > DS1307RTC > ReadTest.

#include <DS1307RTC.h>
#include <Time.h>
#include <Wire.h>

void setup() {
  while (!Serial) ; // wait for serial
  Serial.println("DS1307RTC Read Test");

void loop() {
  tmElements_t tm;

  if ( {
    Serial.print("Ok, Time = ");
    Serial.print(", Date (D/M/Y) = ");
  } else {
    if (RTC.chipPresent()) {
      Serial.println("The DS1307 is stopped.  Please run the SetTime");
      Serial.println("example to initialize the time and begin running.");
    } else {
      Serial.println("DS1307 read error!  Please check the circuitry.");

void print2digits(int number) {
  if (number >= 0 && number < 10) {

Write a review

Your Name:

Your Review: Note: HTML is not translated!

Rating: Bad           Good

Enter the code in the box below:

Powered By OpenCart
Giga Technology © 2024