09-23-2019, 10:30 AM
(06-26-2019, 06:55 PM)frankpintosr Wrote:(06-26-2019, 04:18 PM)edy@weber.org Wrote:(05-06-2019, 05:34 PM)BlueWave Wrote: There are 3 popular RTC chips: PCF8523, DSL1307 and a DS3231.thanks.. I have a problem. Those pins are used for the official 7" touchscreen.......
The RPI pinout can be found here:
https://pinout.xyz/
Hi Edy, here are the exact steps I followed.
sudo cp /boot/config.txt /boot/config.txt.backup sudo nano /boot/config.txt #Add the following line dtoverlay=i2c-rtc,ds3231 sudo mv /lib/udev/hwclock-set /lib/udev/hwclock-set.backup sudo nano /lib/udev/hwclock-set #If the following lines exist comment them out, if they do not exist, add them #if [ -e /run/systemd/system ] ; then # exit 0 #fi # Set date and time #Check the date and time of the RTC sudo hwclock -r #Write the system time to the RTC sudo hwclock -w #Set the system time from the RTC sudo hwclock -s #Disable the fake-hwclock sudo apt-get -y remove fake-hwclock sudo update-rc.d -f fake-hwclock remove sudo systemctl disable fake-hwclock sudo reboot now
sudo nano /boot/config.txt
#Add the following line
dtoverlay=i2c-rtc,ds3231
sudo mv /lib/udev/hwclock-set /lib/udev/hwclock-set.backup
sudo nano /lib/udev/hwclock-set
#If the following lines exist comment them out, if they do not exist, add them
#if [ -e /run/systemd/system ] ; then
# exit 0
#fi
I've connect ds3231 to raspberry and only applied these 9 lines steps. It's working now very good. I've done it in my first try. Thanks.