ikram
Posts: 85
Joined: Fri May 20, 2016 10:37 am

USING RTC PCF8563 on RASPBERRY PI 3

Wed Feb 22, 2017 10:17 am

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?

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: USING RTC PCF8563 on RASPBERRY PI 3

Wed Feb 22, 2017 9:35 pm

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.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: USING RTC PCF8563 on RASPBERRY PI 3

Wed Feb 22, 2017 10:52 pm

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.

ikram
Posts: 85
Joined: Fri May 20, 2016 10:37 am

Re: USING RTC PCF8563 on RASPBERRY PI 3

Thu Feb 23, 2017 7:44 am

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:

alphanumeric
Posts: 2547
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: USING RTC PCF8563 on RASPBERRY PI 3

Thu Feb 23, 2017 1:24 pm

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.

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: USING RTC PCF8563 on RASPBERRY PI 3

Thu Feb 23, 2017 1:51 pm

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
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

ikram
Posts: 85
Joined: Fri May 20, 2016 10:37 am

Re: USING RTC PCF8563 on RASPBERRY PI 3

Thu Feb 23, 2017 2:48 pm

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 ;)

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: USING RTC PCF8563 on RASPBERRY PI 3

Thu Feb 23, 2017 9:12 pm

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.)
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: USING RTC PCF8563 on RASPBERRY PI 3

Thu Feb 23, 2017 10:28 pm

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.

Return to “General discussion”