Real-time clock – 8563p IC


The 8536p IC is used in various DYI projects to accurately keep track of date(dd/mm/yyyy) and time(hh/mm/ss). It can also be configured to trigger an alarm.

In this article you will learn to:

  • Hook up the IC to an Arduino
  • Communicate using I2C
  • Set time and date
  • Read time and date
Components used
Component Quantity Link
Real time clock IC – 8563p 1 Datasheet
Resistor – 2.2 kΩ 2
Ceramic capacitor – 0.1μF 1
Oscillator – 32.763 KHz 1
Arduino Nano 1

Set up

The 8563p only requires a few external components in order to work. Set up the IC and the Arduino by following the steps and figures below.

  • OSC1 to one leg of the oscillator
  • OSC0 to the second leg of the oscillator
  • INT is used for interrupts. Leave this pin unconnected
  • GND to arduino’s GND
  • VCC to arduino’s +5V
  • CLKOUT is used for output of the clock rate. Leave this pin unconnected
  • SCL is connected to analog pin 5(A5) on the arduino. SCL stands for Serial Clock Line
  • SDA is connected to analog pin 4(A4). SDA stands for Serial Data Line
Figure 2: Wiring of the IC
Figure 3: Pin configuration – 8563p

The software

I’ve added a simple sketch for you to download. It uses a library called RTC-PCF8563 (arduino playground) created by Joe Robertson. Do the following

  • Download library from Arduino Playground. Unzip and place the folder “Rtc_Pcf8563” where you please
  • Open the Arduino IDE. Go to Sketch->Import library->Add library and find your folder
  • Download the sketch rtc-example.ino
  • Compile and burn code to arduino

Download rtc-example.ino

The sketch will takes input commands from the Serial monitor and transfers them over I2C to the 8563p. Begin with the char ‘#’ to signal setting time/date. Then send 12 more chars containing the data. Accepted format: “#ddmmyyhhmmss”

Example: #190914160614 (Corresponds to 19/9-14 – 16:06:14)

Figure 4: Running the Arduino sketch. Setting and reading time and date from 8563p

PCB board layout

This pcb breakout board allows for easy connection to the 8563p ic.

Figure 5: Breakout PCB for 8563p

The printable etches:

Download etch_top.pdf

Download etch_top_mirror.pdf

The etch as editable fritzing file

Download realtimeclv3.fzz