Heres my simple real time clock on a breadboard.
Using the DS1307 http://www.glacialwanderer.com/_blog/blog2008/04_April/DS1307.pdf
The breakout boards you can buy seemed a bit expensive so I decided to hook up the cheap components on a breadboard to try out on my Arduino.
The Crystal is 32768kHz.
The battery is a 3v coin cell in a holder.
Heres a pic
Heres a schematic of the breadboard.
The photo doesn't completely match the schematic but the wiring and pins are correct.
Thanks to http://code.rancidbacon.com/ElectronicBreadboardTemplates
for the inkscape template.
I used the code from this forum topic http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1191209057
You need to install the DS1307 library from there.
This code was compiled on version 13 of the ide with a 328p but will work with a standard arduino.
for(int i=0; i<7; i++)
To initialy set the time uncomment the RTC.set lines and change the values.
Once youve done this the clock is set and the 3v battery keeps the time.
Eventually its going to be incorporated in my main project.
A temperature logging device with one wire temp sensors ,web server, serial lcd display, buttons and using the 328p. But its an ever evolving project. Once I get the time tied up with the temp data, Ill be nearly there.
If Ive made a glaring mistake let me know.