Contributors:
jimblom
Favorited
Favorite
6
Introduction
The SparkFun Real Time Clock Module is a simple breakout board for the DS1307 real-time clock (RTC). It can accurately keep track of seconds, minutes, hours, days, months, and years for almost a decade, so your microcontroller doesn't have to. It's the perfect component for clocks, calendars, or any other time-keeping project.
Only 10 left!
BOB-12708
This is the SparkFun Real Time Clock (RTC) Module, this little breakout that uses the DS1307 to keep track of the current yea…
18
The IC on the SparkFun RTC Module is the Maxim DS1307. It features a two-wire I2C interface and even includes a square wave output pin. Plus, with a battery backup, the DS1307 can keep time for almost a decade or more (typically 17 years)!
This tutorial serves as a general introduction to the DS1307 and the SparkFun Real Time Clock Module. It covers both the hardware and firmware requirements of the breakout -- documenting both example wiring and Arduino code for the chip.
Suggested Materials
You'll need a handful of extra parts to get the RTC Module up-and-running. Below are the components used in this tutorial, if you want to follow along.
A microcontroller that supports I2C is required to communicate with the DS1307 and relay the RTC's data to the user. The SparkFun RedBoard or Arduino Uno are popular options for this role, but just about any microcontroller development board should work. (The firmware examples use an Arduino library, if that serves as any extra motivation to use an Arduino.)
In stock
DEV-11113
SparkFun's minimal design approach to Arduino. This is a 5V Arduino running the 16MHz bootloader.
140
Out of stock
DEV-12640
Here at SparkFun, we refuse to leave 'good enough' alone. That's why we're adding to our line-up of Arduino-compatible microc…
82
Only 1 left!
DEV-11021
This is the new Arduino Uno R3. In addition to all the features of the previous board, the Uno now uses an ATmega16U2 instead…
138
Retired
DEV-12757
At SparkFun we use many Arduinos and we're always looking for the simplest, most stable one. Each board is a bit different an…
127
Retired
5V Recommended! The DS1307 should nominally be powered at a voltage around 5V. It doesn't support 3.3V. If your development board runs at 3.3V, you may need to do some level-shifting to get the module communicating.
Four or five jumper wires and a breadboard help interface the RTC Module to your Arduino. To insert the breakout into the breadboard, you'll need to solder headers to the pins. (Don't forget a soldering iron and solder!)
In stock
PRT-12002
This is your tried and true white solderless breadboard. It has 2 power buses, 10 columns, and 30 rows - a total of 400 tie i…
48
In stock
PRT-00116
A row of headers - break to fit. 40 pins that can be cut to any size. Used with custom PCBs or general custom headers.
20
Out of stock
TOL-09507
This is a very simple fixed temp, quick heating, 30W 110/120 VAC soldering iron. We really enjoy using the more expensive iro…
7
Retired
PRT-13870
These are 101mm long 20AWG jumpers with male connectors on both ends. Use these to jumper from any female header on any board…
Retired
The RTC Module does include a 12mm Coin Cell Battery. You shouldn't need one for a long while, but if you want to stock up on the lithium batteries, the option is there.
Suggested Reading
The SparkFun RTC Module is a very beginner-friendly breakout board. There are, however, still a few concepts you should be familiar with. If any of the tutorial titles below sound foreign to you, consider giving them a look-through:
Installing an Arduino Library
How do I install a custom Arduino library? It's easy! This tutorial will go over how to install an Arduino library using the Arduino Library Manager. For libraries not linked with the Arduino IDE, we will also go over manually installing an Arduino library.
What is an Arduino?
What is this 'Arduino' thing anyway? This tutorials dives into what an Arduino is and along with Arduino projects and widgets.
I2C
An introduction to I2C, one of the main embedded communications protocols in use today.