DS1307 RTC please Help!


Hello all,

I Know the basics about microcontrollers. Im trying to read and write to an adafruit DS1307 breakout board. All the libraries and examples i am finding are old and compile errors or include libraries/header files i do not have.The one on the adafuit website with the library just isnt working for me. it start referring to data logging shields. which is not what im doing.

I really just want to set and read the time. I just bought a new Rev 3 board. I have the latest software. I would really appreciate if someone could point me towards a straight forward approach to getting my I2C protocol working.

to start with what pins are the clock and data sent on? I am unable to find out the wire out on most of these libraries. and the code doesnt seem to explain it. of course if its on the TX RX that would make more sense... anyways.

any help would be greatly appreciated.

thank you for your time. I know im a noob


Connections explained here, along with sample code: http://www.ladyada.net/learn/breakoutplus/ds1307rtc.html

Note that the AFI breakout board can be directly plugged into the header on an Uno.

If you have an old library that doesn't compile try changing the #includes - if WProgram.h or WConstants.h are #included, change to Arduino.h for Arduino version 1.0 and later like this:

#if defined(ARDUINO) && ARDUINO >= 100
  #include "Arduino.h"
  #include "WProgram.h"