meereck
Posts: 6
Joined: Sun Apr 22, 2012 9:18 pm

Re: RTC

Mon Apr 23, 2012 8:47 am

Hi all, I assume the board does not have a backup battery or a RTC, right?

Has anybody played around with an external RTC?

Cheers, Meereck

User avatar
RaTTuS
Posts: 10565
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: RTC

Mon Apr 23, 2012 9:26 am

1) yes correct , it does not have a RTC

2) yes probably - I've seen people talking about adding one ,

3) the RPi gets time from the internet if plugged in

what reason do you ask for
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

arm2
Posts: 253
Joined: Thu Dec 15, 2011 3:46 pm

Re: RTC

Tue Apr 24, 2012 8:55 pm

meereck said:


Hi all, I assume the board does not have a backup battery or a RTC, right?

Has anybody played around with an external RTC?


<advert mode ON>

We have them in stock! They have been tested on other hardware, we are just waiting for R-Pi drivers before we start selling them!

I'm hoping drivers will be available within a week! http://www.cjemicros.co.uk/rpi

User avatar
jbeale
Posts: 3699
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: RTC

Tue Apr 24, 2012 9:06 pm

I assume any I2C clock chip would work as a RTC. There is a common one based on the Dallas Semiconductor DS1307 often used to provide time for Arduinos and similar devices, for example http://www.sparkfun.com/products/99

There is a more accurate chip, the DS3231 which is mostly software-compatible, which is as good or better than a typical wristwatch for timekeeping (less than 1 minute drift per year). Available for example as the "Chronodot" board, http://www.adafruit.com/products/255

Once someone writes a software driver to talk to a DS1307 or DS1337 chip, it should work for many different RTC boards now available.

naicheben
Posts: 344
Joined: Sat Jan 28, 2012 12:28 pm
Contact: Website

Re: RTC

Tue Apr 24, 2012 9:40 pm

AFAIK DS1337 is 3,3V compatible and included in the kernel source.

arm2
Posts: 253
Joined: Thu Dec 15, 2011 3:46 pm

Re: RTC

Wed Apr 25, 2012 8:42 pm

naicheben said:


AFAIK DS1337 is 3,3V compatible and included in the kernel source.


Correct, which is why we use it

tech_monkey
Posts: 130
Joined: Fri Mar 09, 2012 6:12 pm

Re: RTC

Wed Apr 25, 2012 8:58 pm

Slight off topic warning here.

Oh wow CJE Micro still going strong. And you still have the shop in Worthing near the swimming pool. I actually remember going to your house in the early days of the Beeb to buy stuff, as I used to live round the corner.

Can't believe it. Have had more blasts from the past than on any other forum. Old Acorn enthusiast seem to be everywhere.
http://www.casatech.eu

arm2
Posts: 253
Joined: Thu Dec 15, 2011 3:46 pm

Re: RTC

Thu Apr 26, 2012 6:33 am

arm2 said:


naicheben said:


AFAIK DS1337 is 3,3V compatible and included in the kernel source.


Correct, which is why we use it



Correction. We don't use the DS1337 we use the DS1338 which has built in support for a battery. The DS1337 would need extra components!

naicheben
Posts: 344
Joined: Sat Jan 28, 2012 12:28 pm
Contact: Website

Re: RTC

Thu Apr 26, 2012 7:36 am

arm2 said:


arm2 said:


naicheben said:


AFAIK DS1337 is 3,3V compatible and included in the kernel source.


Correct, which is why we use it


Correction. We don't use the DS1337 we use the DS1338 which has built in support for a battery. The DS1337 would need extra components!



Can't see the DS1338 is available in DIP-8 package, is it? I'm too old to solder SO-8 ...

Extra components like 2 shotky diodes?

selsinork
Posts: 151
Joined: Mon Apr 16, 2012 8:31 am

Re: RTC

Thu Apr 26, 2012 3:29 pm

arm2 said:

Correction. We don't use the DS1337 we use the DS1338 which has built in support for a battery. The DS1337 would need extra components!

How much are you getting DS1338's for ?   I think I'll be using an MCP79410, which seems to be about a quarter of the cost (unless you're buying 100K of the little buggers, then who knows).

It uses the same driver as the ds1307/1337/1338 too.

arm2
Posts: 253
Joined: Thu Dec 15, 2011 3:46 pm

Re: RTC

Tue May 01, 2012 5:53 pm

selsinork said:


arm2 said:


Correction. We don't use the DS1337 we use the DS1338 which has built in support for a battery. The DS1337 would need extra components!


How much are you getting DS1338's for ?   I think I'll be using an MCP79410, which seems to be about a quarter of the cost (unless you're buying 100K of the little buggers, then who knows).

It uses the same driver as the ds1307/1337/1338 too.


I'd lined up a good deal on the DS1338, but yes the MCP79410 is cheaper and does the same job, the MCP79400 is even cheaper (it is a MCP79410 without the 1Kbit EEPROM).

Both MCP chips have a different I2C address to the DS1338 but apart from that it actually seems slightly better!

Thanks for the heads up! Chris Evans

arm2
Posts: 253
Joined: Thu Dec 15, 2011 3:46 pm

Re: RTC

Fri May 18, 2012 4:08 pm

Update: If you look at the 2010-2011 version of the datasheet for the MCP79410 or MCP7940 you will see they recommend a capacitor on each crystal line and a capacitor, resistor and schottky diode on the battery line. The DS1338 doesn't need those five extra components. Fortunately I found this out before ordering a batch of MCP79410s!

selsinork
Posts: 151
Joined: Mon Apr 16, 2012 8:31 am

Re: RTC

Fri May 18, 2012 6:12 pm

Yep, need a few extras. Still my calculation went like this:

Code: Select all

DS1338Z-33+  4.01
crystal      0.37
total        4.38

MCP79410     0.63
2x 12pf caps 0.08
diode        0.04
resistor     0.009
100pf cap    0.006
crystal      0.37
total        1.135
So as always there's a trade off to be made, some extra board space (not an issue compared to the footprint of of a battery) and some solder joints too. I wonder if the same sort of things were discussed by the foundation when trying to save pennies here and there to keep the cost of the Pi down :)

Obviously slightly different for me as well, everything apart from the chip was already available and I'll only ever be building a handful of them.

petr.brouzda
Posts: 1
Joined: Wed Jun 06, 2012 5:29 pm

Re: RTC

Wed Jun 06, 2012 9:11 pm

I've found cheap RTC module with batery backup and 3.3V-compatible I2C interface.
For less then 6 USD, with free shipping to EU.
http://www.goodluckbuy.com/.....

I tested it and it is working.
I wrote step by step how-to:
http://pebrou.posterous.com/...

timsoft
Posts: 1
Joined: Mon Jul 30, 2012 9:00 pm

Re: RTC

Mon Jul 30, 2012 9:09 pm

i built my own rtc module based on mcp79410. it shows up as 0x57 (and possibly 0x6f) on i2cdetect 0.
however I'm running armedslack on my raspberrypi and the line
echo pcf8563 0x51 > /sys/class/i2c-adapter/i2c-0/new_device
on your howto fails, because i have /sys/class/i2c-dev/i2c-0 and whatever combination I try, I get a "no such file or directory" error. any clues?
I have installed the i2c-tools package, and modprobe i2c-dev and have /dev/i2c-0 and /dev/i2c-1 as expected.

Return to “General discussion”