Knowledge Base

The AB Electronics UK Knowledge Base provides support solutions, tutorials and troubleshooting guides.

Knowledge Base

RTC Alarm Pi (Discontinued)

RTC Clock Module with alarm for the Raspberry Pi

We have been made aware of an issue with the latest Linux kernel used with Raspberry Pi operation systems and the PCF8563 Real-Time Clock IC from NXP, which we use on the Alarm Pi.

The latest kernel version appears to have broken the support for this chip, so it isn’t recognised when using the Linux hwclock to get and set the time and date.

We have withdrawn the sale of this item until the Linux kernel supports the PCF8563 chip again. The board can still be accessed using our demo python scripts, available to download at https://github.com/abelectronicsuk/AlarmPi.

 

The RTC Alarm Pi is a real-time clock expansion board for the Raspberry Pi and is based around the PCF8563 Real-Time Clock IC from NXP. The PCF8563 is controlled via the I2C port on the Raspberry Pi and includes an interrupt-based alarm output, which can be set to pull high at a specified date and time.

Backup power for The RTC Alarm Pi is provided via a 1-farad super-capacitor in place of the lithium coin cell found on most other Real-Time Clock boards. This has the advantage of recharging when the Raspberry Pi is switched on and will not need to be replaced at regular intervals, reducing cost and waste. For greater accuracy, a trimming capacitor is used on the RTC Alarm Pi to fine-tune the 32.768 kHz quartz crystal frequency.

The RTC Alarm Pi is pin-compatible with the Raspberry Pi model B+.

A Microchip PIC12LF1822 microcontroller is included on the RTC Alarm Pi connected to the PCF8563 interrupt pin. When the interrupt is pulled high, the microcontroller 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 it 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, allowing you to reprogram the PIC microcontroller for your 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 lets you power the real-time clock and microcontroller while the Raspberry Pi is switched off.

The RTC Alarm Pi has direct outputs for the PCF8563 interrupt pin and the 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.

Datasheets

RTC Alarm Pi

PCF8563 Real-Time Clock

PIC12LF1822 Microcontroller

Schematic

Click to View
View the 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:

modprobe i2c-dev
modprobe rtc-pcf8563

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:

hwclock --systohc

View the current date and time stored in the RTC Pi:

hwclock -r

Set the Linux system time to the value in the RTC Pi:

hwclock –s

To set the RTC Pi with a custom time:

hwclock --set --date="2012-12-25 06:00:12"  --utc


Was this article helpful? Yes No

Please tell us how we can improve this article:

Submit
Created 24/11/2016 | Last Updated: 01/01/2024

Related Expansion Boards

Order a Expander Pi Photo of Expander Pi
Expander Pi

Analogue, Digital and RTC Expansion Interface for the Raspberry Pi

£27.59 Ex VAT: £22.99
Add to Cart
Order a RTC Pi Photo of RTC Pi
RTC Pi

Real-time clock for the Raspberry Pi

£11.39 Ex VAT: £9.49
Add to Cart

Related Articles

ADC Pi (Discontinued)
ADC Pi V1 and V2 expansion boards
Serial Pi (Discontinued)
Serial Pi RS232 Expansion board
Expander Pi (Discontinued)
Information for Expander Pi expansion board Legacy Product
Logic Level Converter (Discontinued)
Information for Logic level converter
RTC Pi (Discontinued)
Product Information for the version one RTC Pi board
ADC DAC Pi (Discontinued)
2 Channel ADC and 2 Channel DAC for the Raspberry Pi
Buffer Pi - Legacy Product
Bi-directional voltage-level translator for the Raspberry Pi
RTC Alarm Pi (Discontinued)
RTC Clock Module with alarm for the Raspberry Pi
Com Pi (Discontinued)
Com Pi for the Raspberry Pi
IO Pi Plus 1.0 (Discontinued)
IO Pi Plus 1.0 Legacy version information
Delta-Sigma Pi (Discontinued)
Delta-Sigma Pi ADC Board
IO Pi (Discontinued)
IO Pi Expansion board
IO Pi Zero (Discontinued)
Legacy product information for the IO Pi Zero
1 Wire Pi (Discontinued)
1 Wire Pi expansion board legacy information
1 Wire Pi Plus 1.0 (Discontinued)
1 Wire Pi Plus 1.0 - Legacy version information