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!

This guide was first published on Jan 29, 2013. It was last updated on Mar 08, 2024.

This page (Wiring It Up) was last updated on Jan 29, 2013.

Text editor powered by tinymce.