Page 1 of 1

USING RTC PCF8563 on RASPBERRY PI 3

Posted: Wed Feb 22, 2017 10:17 am
by ikram
i used a PCF8563 RTC with Raspberry pi 3 ,ranning 2016-09-23-raspbian-jessie
i did this steps:
sudo vi /etc/modules
add the following lines at the end of the file :
i2c-bcm2708
i2c-dev
rtc-pcf8563
install i2c-tools:sudo apt-get install i2c-tools
after reboot : sudo i2cdetect -y 1

Code: Select all

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- 
is this means that my Pi didn't detect the RTC?

how can i solve this problems?

Re: USING RTC PCF8563 on RASPBERRY PI 3

Posted: Wed Feb 22, 2017 9:35 pm
by DougieLawson
That's not the way it's done with Jessie and the device tree enabled kernel.

Undo all that stuff in /etc/modules you don't need any of that.

Add

Code: Select all

 dtoverlay=i2c-rtc,pcf8563
to /boot/config.txt and reboot.

Re: USING RTC PCF8563 on RASPBERRY PI 3

Posted: Wed Feb 22, 2017 10:52 pm
by gregeric
Dougie's advice is enough to get the RTC working ie readable & writable by the kernel.

But that's not the end of it. There are further steps to disable Raspbian's fakehwclock & have linux store the network time on the hwclock at poweroff.

Re: USING RTC PCF8563 on RASPBERRY PI 3

Posted: Thu Feb 23, 2017 7:44 am
by ikram
thank you for your help i tried what you sayed the RTC works verry well but it still show me 'UU' where 0x51 should be :(
and also when i shut down the raspberry the date change to another date :shock: :shock:

Re: USING RTC PCF8563 on RASPBERRY PI 3

Posted: Thu Feb 23, 2017 1:24 pm
by alphanumeric
Like gregeric said, there are a few other steps to get it fully working. Have a look at this and see if it helps, https://learn.adafruit.com/adding-a-rea ... t-rtc-time I have a DS1307 and DS3231 from Adfuit and they both work fine after following that tutorial.

Re: USING RTC PCF8563 on RASPBERRY PI 3

Posted: Thu Feb 23, 2017 1:51 pm
by texy
UU means that address is reserved by a driver - so although the device tree method is now current and the preferred approach, the older method by manually loading the drivers via /etc/modules was still probably working OK.....

Texy

Re: USING RTC PCF8563 on RASPBERRY PI 3

Posted: Thu Feb 23, 2017 2:48 pm
by ikram
thank you for your help ;)
i tried the steps and it works :)

PS: in the RTC pcf8563 there is a jumper (vcc batterie) we shoud change it to the buttry to save the time when the raspberry is off ;)

Re: USING RTC PCF8563 on RASPBERRY PI 3

Posted: Thu Feb 23, 2017 9:12 pm
by DougieLawson
texy wrote:UU means that address is reserved by a driver - so although the device tree method is now current and the preferred approach, the older method by manually loading the drivers via /etc/modules was still probably working OK.....

Texy
Except that RTCs normally show up at 0x68. (Note:I've not checked the datasheet for this one.)

Re: USING RTC PCF8563 on RASPBERRY PI 3

Posted: Thu Feb 23, 2017 10:28 pm
by gregeric
DougieLawson wrote:
texy wrote:UU means that address is reserved by a driver - so although the device tree method is now current and the preferred approach, the older method by manually loading the drivers via /etc/modules was still probably working OK.....

Texy
Except that RTCs normally show up at 0x68. (Note:I've not checked the datasheet for this one.)
That particular RTC PCF8563 has I2C address 0x51, so texy was bang on with his observation.