transferred serially through an I2C bus. Additional functionality is programmable Square-Wave output signal. You can set four frequency (1Hz, 4kHz, 8kHz, 32kHz) on the SQW/OUT pin.Download library RTC_DS1307 for Arduino IDE

void loop() { //Read time from DS1307 and display (You must be connected to the serial port to see results)
rtc.DisplayTime();
//Convert time to unix timestamp
long uts = rtc.UnixTimestamp();
Serial.println( uts );
delay(1000);
}

Step 5: Write and Read NV SRAM

DS1307 has 56 bytes of NV SRAM for general use. For example, you can store configuration data.