LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 04-12-2016, 12:23 PM   #1
Penthux
Member
 
Registered: Dec 2008
Location: Middlesbrough, UK
Distribution: Slackware
Posts: 264

Rep: Reputation: 74
Thumbs up DS3231 RTC installation guide for RPi updated


The ChronoDot RTC [DS3231] installation guide for the Raspberry Pi has been updated to include Device Tree (DT) and non-Device Tree (pre-DT) methods.

http://rpi.fatdog.eu/index.php?p=chronodot-rtc

Whichever method you choose to use, it should be easy to install and configure a DS3231 RTC on your Slackware ARM system.
 
Old 05-27-2016, 02:48 PM   #2
slackist
Member
 
Registered: Feb 2004
Location: Phuket
Distribution: Slackware 14.2 and Slackware Arm
Posts: 479

Rep: Reputation: 44
And many thanks for doing that. I got my first ever Raspi this morning and it came bundled with a DS1307 rtc module, your instructions were very helpful.
 
Old 05-27-2016, 03:50 PM   #3
Penthux
Member
 
Registered: Dec 2008
Location: Middlesbrough, UK
Distribution: Slackware
Posts: 264

Original Poster
Rep: Reputation: 74
Quote:
Originally Posted by slackist View Post
And many thanks for doing that. I got my first ever Raspi this morning and it came bundled with a DS1307 rtc module, your instructions were very helpful.
You are very welcome, and I hope you have a wonderful Slackware ARM on a Raspberry Pi experience.
 
Old 09-15-2016, 12:07 AM   #4
slackist
Member
 
Registered: Feb 2004
Location: Phuket
Distribution: Slackware 14.2 and Slackware Arm
Posts: 479

Rep: Reputation: 44
How many wires does an rtc need?

I just received a breadboard and one of the T-cobbler things ( ) so my rtc (this model):
http://thaieasyelec.com/en/developme...pi-detail.html

is now hooked up to it all and working fine. To play it safe I used 10 wires (because I know nothing about this stuff so I was being cautious) and just replicated the pins that the rtc usually covers on the GPIO but 10 seems excessive for a clock!

I've been goggling it for a while and as far as I can tell it will only need 5V, GND and the GPIO2, GPIO3 (aka SDA1 i2c and SCL1 i2c aaka Pins 3 & 5 depending on which schematic you follow)

Is that right?
 
Old 09-15-2016, 09:07 AM   #5
Penthux
Member
 
Registered: Dec 2008
Location: Middlesbrough, UK
Distribution: Slackware
Posts: 264

Original Poster
Rep: Reputation: 74
Quote:
Originally Posted by slackist View Post
How many wires does an rtc need?

I've been goggling it for a while and as far as I can tell it will only need 5V, GND and the GPIO2, GPIO3 (aka SDA1 i2c and SCL1 i2c aaka Pins 3 & 5 depending on which schematic you follow)

Is that right?
Only 4 connections are required and you already have it absolutely correct, slackist. Use the wiring layout from sarpi if it helps. The hardware may be different but the connections are exactly the same for DS1307 and DS3231 RTCs. For connecting a RTC such as yours you might consider using a GPIO extender, such as this, but only if raising the height of the GPIO pins is going to make things easier.

There are quite a few differences from device to device in quality and reliability with RTCs. I find the ones with Maxim controllers to be the easiest to work with, the best supported, and the most reliable. The DS1307 is regulated by a frequency-based crystal oscillator and the DS3231 is regulated by an integrated temperature-compensated crystal oscillator. The difference here is; the DS3231 is a hell of a lot more accurate at keeping time than the DS1307. With the DS1307 you could be very lucky and get a really good one which only loses/gains a second per month. With the DS3231 you probably won't lose/gain a second in two or three months.
 
1 members found this post helpful.
Old 09-15-2016, 10:20 AM   #6
slackist
Member
 
Registered: Feb 2004
Location: Phuket
Distribution: Slackware 14.2 and Slackware Arm
Posts: 479

Rep: Reputation: 44
Brilliant and thanks so much for the assist Penthux.

New cron.weekly job is set up to write clock time from a server.

After I fiddle with it tomorrow hopefully it will look better without so many wires attached to the breadboard.
 
Old 09-15-2016, 02:56 PM   #7
Penthux
Member
 
Registered: Dec 2008
Location: Middlesbrough, UK
Distribution: Slackware
Posts: 264

Original Poster
Rep: Reputation: 74
Quote:
Originally Posted by slackist View Post
Brilliant and thanks so much for the assist Penthux.

New cron.weekly job is set up to write clock time from a server.

After I fiddle with it tomorrow hopefully it will look better without so many wires attached to the breadboard.
You're welcome. Sharing experience and knowledge is hopefully going to save you time and effort. Although seriously, I would think about a GPIO extender (like these - 2x5pins) for your particular RTC, but only if it isn't going to get in the way of the heatsink/fan when it's installed. Then you could kiss goodbye and good riddance to those wires.

Last edited by Penthux; 09-15-2016 at 03:03 PM. Reason: updated URL
 
Old 09-15-2016, 07:57 PM   #8
glorsplitz
Senior Member
 
Registered: Dec 2002
Distribution: slackware!
Posts: 1,308

Rep: Reputation: 368Reputation: 368Reputation: 368Reputation: 368
wittyPi2

I got wittyPi2 to do rtc and have an ON switch.

I can shutdown and the sarpi turns off and I can push the little black button to turn it on.

Using their software I was able to get the rtc stuff together but not sure why system and rtc are 1 hour off, haven't had time to look into it.

The case with fan is from amazon, fan is very noisy.
Attached Thumbnails
Click image for larger version

Name:	wpi-1.jpg
Views:	33
Size:	112.0 KB
ID:	23027   Click image for larger version

Name:	wpi-2.jpg
Views:	33
Size:	110.6 KB
ID:	23028  
 
Old 09-15-2016, 08:27 PM   #9
slackist
Member
 
Registered: Feb 2004
Location: Phuket
Distribution: Slackware 14.2 and Slackware Arm
Posts: 479

Rep: Reputation: 44
I've got a 40 pin GPIO extender and the ribbon cable that leads to the T-cobbler on the breadboard takes up all of it and I am reluctant to start snipping wires off because I am a total newb at this sort of thing.

It now has a little (14x14x10mm) heat sink mounted the SoC and I think I can scavenge a fan from my Mrs desktop that has a spare one in the case so that will be the next steps.
 
Old 09-16-2016, 01:39 PM   #10
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by glorsplitz View Post
Using their software I was able to get the rtc stuff together but not sure why system and rtc are 1 hour off, haven't had time to look into it.
If you happen to be +/- 1hr from GMT/UTC, it could be one item is set to utc and the other is set to the local timezone.
 
Old 09-17-2016, 07:35 AM   #11
Penthux
Member
 
Registered: Dec 2008
Location: Middlesbrough, UK
Distribution: Slackware
Posts: 264

Original Poster
Rep: Reputation: 74
Quote:
Originally Posted by glorsplitz View Post
Using their software I was able to get the rtc stuff together but not sure why system and rtc are 1 hour off, haven't had time to look into it.
I've had the same issue and the answer was setting the timezone manually. Perform this as 'root' and set <YOUR_LOCATION> - e.g. Europe/Paris, America/New_York, Africa/Johannesburg, Australia/Melbourne

# rm -f /etc/localtime
# ln -sf /usr/share/zoneinfo/<YOUR_LOCATION> /etc/localtime
# ntpdate 0.pool.ntp.org
# hwclock -w

This will set your timezone correctly.

Take a look in /usr/share/zoneinfo/ for the different zone locations.

< edit - oops! should have been 'hwclock -w' >

Last edited by Penthux; 09-18-2016 at 06:14 AM. Reason: corrected mistake
 
2 members found this post helpful.
Old 09-17-2016, 05:31 PM   #12
glorsplitz
Senior Member
 
Registered: Dec 2002
Distribution: slackware!
Posts: 1,308

Rep: Reputation: 368Reputation: 368Reputation: 368Reputation: 368
Thanks bassmadrigal, Penthux for replying.

I did what Penthux said and now running ./wittyPi.sh I'm getting:

>>> Your system time is: Sat 17 Sep 2016 17:28:11 EST
>>> Your RTC time is: Sat 17 Sep 2016 17:28:11 EST

Cheers!
 
Old 12-11-2016, 09:06 PM   #13
slackist
Member
 
Registered: Feb 2004
Location: Phuket
Distribution: Slackware 14.2 and Slackware Arm
Posts: 479

Rep: Reputation: 44
I'm having an odd problem with my ds1307.

It seems that when I add or remove anything from the breadboard it is connected to it resets itself. Even a simple led+resistor+cables will make the rtc forget its data.

My house electrics aren't earthed/grounded (that is pretty common here in Thailand) so I thought that was the problem but it seems to happen randomly. Sometimes a 'halt' command will carry the date from the rtc upon starting up again, sometimes a 'reboot' command will do also but as often as not either command will cause the clock to reset.

I have tried stopping anything that might write/reset to hwclock and also the ntpdate in rc.local is commented out but it is still happening.
 
Old 12-12-2016, 06:34 AM   #14
Penthux
Member
 
Registered: Dec 2008
Location: Middlesbrough, UK
Distribution: Slackware
Posts: 264

Original Poster
Rep: Reputation: 74
Quote:
Originally Posted by slackist View Post
I'm having an odd problem with my ds1307.
Do you have just the one DS1307 RTC? If you have another then test with it and see if it produces the same error(s). It's a strange problem that might come about if you have a faulty back-up battery connection or some kind of reset going on. Perhaps getting rid of the breadboard setup is the first step?

I would highly recommend that you ditch the DS1307 and replace it with a DS3231 which are vastly more reliable/accurate.

Last edited by Penthux; 12-12-2016 at 06:35 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Mini-PC taps RPi Compute Module and supports RPi 2 LXer Syndicated Linux News 0 02-22-2015 03:03 PM
RPi Slackware ARM installer updated to 3.10.22 kernel Exaga Slackware - ARM 0 12-11-2013 03:44 AM
[SOLVED] Looking for LPIC Study Guide. Updated to the current objectives future_open Linux - Certification 6 05-04-2010 04:04 AM
LXer: Eva's useful guide to Ubuntu 9.10 (updated!) LXer Syndicated Linux News 0 11-14-2009 10:50 PM
RTC Alarm wakes up, even while BIOS has RTC alarm disabled mastermind2501 Linux - Newbie 2 12-22-2008 03:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 09:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration