MOUSER PART NUMBER
1 32.768 watch crystal 815-AB38T- 32.768KHZ
1 Battery holder 12 mm coin 534-3001
1 Battery CR1220 614-CR1220
1 Capacitor 0.1 µF 21RZ310-RC
2 Resistor 2.2K ohm 660-MF1/4DCT52R2201F
Table 1. Bill of Materials.
■ FIGURE 10. Arduino DS1307 sketch output
in a serial monitor.
■ FIGURE 11. DS1307 RTC schematic.
■ FIGURE 12. DS1307-RTC parts kit.
to be directly used to express human readable numbers
without translating them. In a later Workshop, we will see
how to use what we have learned about data structures to
manipulate the DS1307 data in software. Since
we are limited in space, let’s build our real time
clock now and learn about the code later.
Build a DS1307 Circuit
on a Breadboard
seconds in a minute — all 60 of them in five bits (stores up
to 64 unique values). What you are seeing is BCD (Binary
Coded Decimal) storage. This allows the binary numbers
60 July 2012
We see an illustration for a DS1307 circuit on
a breadboard in Figure 4. This illustration was
generated in Fritzing — a very interesting open
source application that hopes to be for Electronic
Computer Aide Design (ECAD) what the Arduino
is for microcontrollers. We will get into the details
of Fritzing next time, but for now let’s build our
real time clock and test it with an Arduino.
We see a close-up of the breadboard in
Figure 5 that has labels added to help us with our
wiring. Figure 6 shows how this looks on a real
With those great images in Figures 4 and 5,
you’d think I’d wire it up like that, but I didn’t. I
had wired it up and tested it before I came across
Fritzing which I used to make Figures 4 and 5. Showing
the alternate wiring doesn’t cause any real problems. You
can wire it up either way, as long as you make sure you