Thanks for your replies,
I have tested voltages on the chip etc as follows
Battery = 3v steady
On the DS1307 between pin 4 (Gnd) and Pin 3 3V+ battery = 3v
Between pin 4 (gnd) and Pin 8 (5v+) = 4.98V
I have the DS1307 Pin 5 connected to Arduino Analog pin 4 and pin 6 on the DS1307 to arduino analog pin 5 with a 10k pullup resistor to 5v+
I am sure I have the chip the right way round there is a notch to indicate the top and a little indented circle to show which side is pin 1.
In my code which I have added to this post if I just try and read values it loops through and I get the following response
0:0:0 0/0/2000
If include the code to set the time then it prints the 'i am setting time message' and then hangs. Nothing else is displayed
#include <WProgram.h>
#include <Wire.h>
#include <DS1307.h>
void setup()
{
Serial.begin(9600);
Serial.println("I am setting Time");
/*
RTC.stop();
RTC.set(DS1307_SEC,1);
RTC.set(DS1307_MIN,23);
RTC.set(DS1307_HR,12);
RTC.set(DS1307_DOW,4);
RTC.set(DS1307_DATE,5);
RTC.set(DS1307_MTH,3);
RTC.set(DS1307_YR,9);
RTC.start();
*/
Serial.println("Setting Time Complete");
}
void loop()
{
Serial.println("I am reading time");
/* Serial.print(RTC.get(DS1307_HR,true)); */
Serial.print(RTC.get(DS1307_HR,false));
Serial.print(":");
Serial.print(RTC.get(DS1307_MIN,false));
Serial.print(":");
Serial.print(RTC.get(DS1307_SEC,false));
Serial.print(" ");
Serial.print(RTC.get(DS1307_DATE,false));
Serial.print("/");
Serial.print(RTC.get(DS1307_MTH,false));
Serial.print("/");
Serial.print(RTC.get(DS1307_YR,false));
Serial.println();
Serial.println("Reading time complete");
delay(1000);
}