Wiring It Up

There are only 5 pins: 5V GND SCL SDA SQW.

  • 5V is used to power to the RTC chip when you want to query it for the time. If there is no 5V signal, the chip goes to sleep using the coin cell for backup.
  • Connect GND to common power/data ground
  • Connect the SCL pin to the I2C clock SCL pin on your Arduino. On an UNO & '328 based Arduino, this is also known as A5, on a Mega it is also known as digital 21 and on a Leonardo/Micro, digital 3
  • Connect the SDA pin to the I2C data SDA pin on your Arduino. On an UNO & '328 based Arduino, this is also known as A4, on a Mega it is also known as digital 20 and on a Leonardo/Micro, digital 2

SQW is the optional square-wave output you can get from the RTC if you have configured it to do so. Most people don't need or use this pin

Fun Plug-in Hack for Arduino UNO

If you set analog pin A3 to an OUTPUT and HIGH and A2 to an OUTPUT and LOW you can power the RTC directly from the pins!

Connect Arduino UNO A4 to SDA. Connect Arduino analog pin A5 to SCL.

This only works on an UNO and other ATmega328-based Arduinos!

Last updated on 2016-09-06 at 05.34.07 PM Published on 2013-01-29 at 06.49.14 PM