Here we will discuss how to configure RTC for Raspberry Pi B+.
1. Install the jumper on the headers labeled ‘RTC JMP’.
2. Enter the following command：
$i2cdetect -y 1
3. Now the I2C address of the PCF8563 will be displayed as following. This means that PCF8563 has been detected by Raspberry Pi B+.
4. Run the following commands:
$modprobei2c-dev $echo pcf8563 0x51 > /sys/class/i2c-adapter/i2c-1/new_device $￼hwclock -r // Read the RTC time of the I2C hardware
Now the time of PCF8563 will be printed in LXTerminal, which is different from the system time
5. Run the following commands:
$hwclock -w //Write the system time of Raspberry Pi to PCF8563 $hwclock -r //Read out the hardware time of PCF8563 $hwclock -s //Sync the system time of Raspberry Pi with PCF8563
Leave a Reply
You must be logged in to post a comment.