I2C / RTC

  • PCF8563
  • incl. Quarz und Backup-Kondensator
  • 15mm x 16mm

PINS

Bilder

Repository

svn://ed-solutions.de/e-design/hardware/misc/i2c/rtc_pcf8563

Linux

Gerät suchen

Raspberry PI ~ # modprobe i2c-dev
Raspberry PI ~ # i2cdetect -l
i2c-0	i2c       	bcm2708_i2c.0                   	I2C adapter
i2c-1	i2c       	bcm2708_i2c.1                   	I2C adapter

Raspberry PI ~ # i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

als RTC benutzen

Raspberry PI ~ # modprobe rtc-pcf8563
Raspberry PI ~ # echo pcf8563 0x51 > /sys/class/i2c-adapter/i2c-1/new_device
Raspberry PI ~ # dmesg | tail -n 5
[  161.584698] i2c /dev entries driver
[  365.449944] rtc-pcf8563 1-0051: chip found, driver version 0.4.3
[  365.451618] rtc-pcf8563 1-0051: low voltage detected, date/time is not reliable.
[  365.452149] rtc-pcf8563 1-0051: rtc core: registered rtc-pcf8563 as rtc0
[  365.452193] i2c i2c-1: new_device: Instantiated device pcf8563 at 0x51

Zeit schreiben

Raspberry PI ~ # busybox ntpd -d -q -p pool.ntp.org
Raspberry PI ~ # date
Fri Jan 11 16:20:04 CET 2013
Raspberry PI ~ # hwclock -wu
Raspberry PI ~ # hwclock 
Fri Jan 11 16:20:15 2013  -0.718393 seconds
hardware/i2c_io_series/rtc.txt · Zuletzt geändert: 2013.01.11 - 15:28 von 127.0.0.1
 
Copyright 2021, e-design / Alexander Krause