View previous topic :: View next topic |
Author |
Message |
ertansuluagac
Joined: 13 Jul 2017 Posts: 135 Location: IZMIR
|
rtc chip |
Posted: Sat Apr 11, 2020 5:30 am |
|
|
What can you suggest for the rtc integration that does not deviate. _________________ Es |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9244 Location: Greensville,Ontario
|
|
Posted: Sat Apr 11, 2020 5:50 am |
|
|
I use the DS3231, on a premade module that also has a small EEPROM and battery holder. Cost about $2 CDN. I can't buy the parts for that price !
I have 5-6 in use around here, mainly Greenhouse projects. I use the 1Hz interrupt function as 'trigger,' updating the LCD module, reading DS18B20 sensors, sending data, etc.
The DS3231 also has a builtin temperature sensor, ok for 'rough' temperature. Also has 7(?) bytes of battery backed RAM.
Jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19545
|
|
Posted: Sat Apr 11, 2020 7:22 am |
|
|
Unless you use something like a GPS or network synchronised clock,
all RTC's are all going to 'deviate'. However some by less than others.
Temperature compensated oscillators like the DS3231 give a guaranteed
accuracy in the order of a minute a year.
A normal RTC based on a watch crystal, if you 'hand tune' the oscillator,
and if kept at a reasonably stable temperature can manage within perhaps
a couple of minutes a year. Build though with no tuning, and an off
the shelf crystal, and it is easy to find yourself with many times this error.
I use the DS1338C on quite a few units, and this has the advantage that the
oscillator is internal and pre-calibrated. Easily manages better than 5 minutes
a year.
I have a clock here built as a calibration source. Uses a 100KHz crystal, in
a temperature regulated over. Then synchronises this to the MSF
transmissions including built in correction for the distance I am from this
transmitter.
Gives me a frequency source guaranteed to be within a very few PPB, and
time that is basically 'atomic' in accuracy. However this involves many
hundred of parts. Conversely have lots of boards with normal RTC's and
these are very unlikely to be far from the actual time, and involve
instead a few dollars of parts.... |
|
|
ertansuluagac
Joined: 13 Jul 2017 Posts: 135 Location: IZMIR
|
|
Posted: Sat Apr 11, 2020 7:40 am |
|
|
I think it supports as ccs c ds1338.c driver. Is there a difference from its use to ds1302? _________________ Es |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19545
|
|
Posted: Sat Apr 11, 2020 8:00 am |
|
|
I've put a DS1338.c driver into the code library. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9244 Location: Greensville,Ontario
|
|
Posted: Sat Apr 11, 2020 8:44 am |
|
|
I've modified the DS1307 driver for the DS3231, though it doesn't use all the functions of the 3231 RTC, like alarms.
I got it to work for me and didn't see the need to make a complete driver.
There maybe be a complete driver in the code library, though I've never checked.
The DS3231 is popular, several PCBs have EEPROM as well. While I tested the EEPROM function on mine, again, never used it but... at $2 a board, a nice feature for future projects.
More important to spread 5 cubic meters of chicken compost onto the garden...sigh.... anyone need some 'upper body exercise' ?? |
|
|
|