A Microchip PIC12LF1822 micro-controller is included on the RTC Alarm Pi connected to the PCF8563 interrupt pin. When the interrupt is pulled high the micro-controller sets the High Alarm pin high and the Low Alarm pin low for 500 milliseconds.
Connecting the Low Alarm pin to the reset pin on the Raspberry Pi allows you to put the Raspberry Pi into a low power sleep mode and then reset it at a set date and time waking the Raspberry Pi up. An ICSP (in circuit serial programming) port is included on the top of the RTC Alarm Pi giving you the option to reprogram the PIC micro-controller for your own needs. A wiring diagram for the PIC Micro-controller ICSP port can be found on page 2 of the data-sheet.
A 3.3V input port is also provided allowing you to power the real-time clock and micro-controller while the Raspberry Pi is switched off.
The RTC Alarm Pi has direct outputs for the PCF8563 interrupt pin and also Clock output. This can be configured to supply a pulsed output at these frequencies: 32.768 kHz, 1.024 kHz, 32 Hz, and 1 Hz.
The video below shows how to use the RTC Alarm Pi with a Raspberry Pi to connect for timed resets.
RTC Alarm Pi
PCF8563 Real Time Clock
Click to download schematic PDF.
How to set and read the time
The RTC Alarm Pi requires a Linux kernel with i2c drivers such as the Occidentalis system image from http://learn.adafruit.com/adafruit-raspberry-pi-educational-linux-distro/overview which has i2c enabled.
To access the RTC Alarm Pi from your Raspberry Pi:
Boot the Pi from that image and execute these commands as root / su user:
First you need to register the PCF8563 RTC chip with the I2C address of 0x51:
For Revision One boards use:
echo pcf8563 0x51 > /sys/class/i2c-adapter/i2c-0/new_device
For Revision Two boards use:
echo pcf8563 0x51 > /sys/class/i2c-adapter/i2c-1/new_device
To set the RTC Pi clock with the current system time:
View the current date and time stored in the RTC Pi:
Set the Linux system time to the value in the RTC Pi:
To set the RTC Pi with a custom time:
hwclock --set --date="2012-12-25 06:00:12" --utc