PCF8593 RTC examples

Hello,
I am looking for examples of sketches for PCF8593 Real Time Clock.
There are just a few libraries for it on the web that I could find and they seem to be for the old version of Arduino and I can't get them to work. But none have example sketches.

Anyone have a working sketch for PCF8593?

Roger

/**
* \author Kevin Browder
* \copyright GNU Public License.
**/
#include "PCF8593.h"
#include "../../PCF85xxRTC.h"
#include "Arduino.h"
#include "Stream.h"
#include <Time.h>

void setup() {
    Serial.begin(9600);
    Serial.println("started");
    PCF85xx::getDefaultRTC()->reset();
    setSyncProvider( PCF85xx::getDefaultTime );
}

void loop() {
    char str[256];
    snprintf(str, 256, "%04u-%02u-%02uT%02u:%02u:%02u", year(), month(),
           day(), hour(), minute(), second());
    Serial.println(str);
    delay(5000);
}

I wasn't able to find anything that I could understand so I modified a sketch for a PCF8536. Here it is:

Roger

Thanks a lot Roger! Was just looking for this.

Do you have schematics how you connected the RTC?

MaxJ:
Do you have schematics how you connected the RTC?

I've added it to the webpage.
Roger