BlueWave Studio forum
  • Login
  • Register
  • Login Register
    Login
    Username:
    Password:
  • Home
  • Help
  • View Today's Post
  • More
    • BlueWave Studio
    • Shop
User Links
  • Login
  • Register
  • Login Register
    Login
    Username:
    Password:

    Quick Links Home Help View Today's Post
    More
    • BlueWave Studio
    • Shop
    BlueWave Studio forum OpenAuto Pro Real Time Clock (RTC) How to connect RTC device to the RPI

    Thread Closed 
    How to connect RTC device to the RPI
    BlueWave
    Offline

    Administrator

    Posts: 2,783
    Threads: 64
    Joined: Jun 2019
    Reputation: 70
    #1
    05-06-2019, 05:34 PM (This post was last modified: 06-23-2019, 10:42 AM by BlueWave.)
    There are 3 popular RTC chips: PCF8523, DSL1307 and a DS3231.

    The RPI pinout can be found here:

    https://pinout.xyz/


    Attached Files Thumbnail(s)
       
    edy@weber.org
    Offline

    Junior Member

    Posts: 12
    Threads: 0
    Joined: Jun 2019
    Reputation: 0
    #2
    06-26-2019, 04:18 PM
    (05-06-2019, 05:34 PM)BlueWave Wrote: There are 3 popular RTC chips: PCF8523, DSL1307 and a DS3231.

    The RPI pinout can be found here:

    https://pinout.xyz/
    thanks.. I have a problem. Those pins are used for the official 7" touchscreen.......
    BlueWave
    Offline

    Administrator

    Posts: 2,783
    Threads: 64
    Joined: Jun 2019
    Reputation: 70
    #3
    06-26-2019, 04:32 PM
    You can use other GND/3V3/5V pins. Please have a look https://www.jameco.com/Jameco/workshop/c..._fig2a.jpg
    frankpintosr
    Offline

    Passionate Carputer Enthusiast

    Posts: 131
    Threads: 11
    Joined: Apr 2019
    Reputation: 13
    #4
    06-26-2019, 06:55 PM
    (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.

    The RPI pinout can be found here:

    https://pinout.xyz/
    thanks.. I have a problem. Those pins are used for the official 7" touchscreen.......

    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
    Thanks, Frank
    Carputer Detail   Parts List
    2004 Chevrolet Tahoe Z71 w/ Bose & Onstar
    edy@weber.org
    Offline

    Junior Member

    Posts: 12
    Threads: 0
    Joined: Jun 2019
    Reputation: 0
    #5
    06-27-2019, 03:55 PM
    (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.

    The RPI pinout can be found here:

    https://pinout.xyz/
    thanks.. I have a problem. Those pins are used for the official 7" touchscreen.......

    Hi Edy, here are the exact steps I followed. 

    THANKS A LOT!!!!!!!!!!



    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
    kirikoglu
    Offline

    Junior Member

    Posts: 13
    Threads: 3
    Joined: Sep 2019
    Reputation: 2
    #6
    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.

    The RPI pinout can be found here:

    https://pinout.xyz/
    thanks.. I have a problem. Those pins are used for the official 7" touchscreen.......

    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.
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)



    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Help · BlueWave Studio · Shop

    Copyright © bluewavestudio.io. All rights reserved.

    Linear Mode
    Threaded Mode