Pages: [1]   Go Down
Author Topic: Arduino Due RTC Library  (Read 4804 times)
0 Members and 1 Guest are viewing this topic.
Germany
Offline Offline
Full Member
***
Karma: 10
Posts: 221
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi folks,

there are my first "final" release of the RTC Library for the Arduino Due.

2 examples included.

I would call it final for the moment.

And on github: https://github.com/MarkusLange/Arduino-Due-RTC-Library

Have fun

Markus

* Due_RTC.zip (4.13 KB - downloaded 87 times.)
« Last Edit: January 23, 2013, 04:13:45 am by Markus_L811 » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Dear Markus,

I've tried to use the RTC library. At first I tried to check the examples to check them  on my arduino, but when verifying, many errors came through.  Is like most of the variables on rtc_clock.cpp are undeclared.

Did you had this problem?

Regards, Arodrisa
Logged

USA, FL
Offline Offline
God Member
*****
Karma: 14
Posts: 686
A life? Where can I download one of those?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Dear Markus,

I've tried to use the RTC library. At first I tried to check the examples to check them  on my arduino, but when verifying, many errors came through.  Is like most of the variables on rtc_clock.cpp are undeclared.

Did you had this problem?

Regards, Arodrisa

Sounds like you installed the library in the wrong location.
Logged

//LiNK

Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I haven't received my due yet but many thanks for the effort.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Dear Markus,

I've tried to use the RTC library. At first I tried to check the examples to check them  on my arduino, but when verifying, many errors came through.  Is like most of the variables on rtc_clock.cpp are undeclared.

Did you had this problem?

Regards, Arodrisa

Sounds like you installed the library in the wrong location.

Can you please tell me where is the right location in Windows? I tried installing it like I do with other arduino libraries, but to no avail I come up with a long list of "" not declared errors when I try to compile the examples. My friend running archlinux compiled the examples no problem.

My mind = boggled...
Logged

USA, FL
Offline Offline
God Member
*****
Karma: 14
Posts: 686
A life? Where can I download one of those?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, there's 2 places you can install them:

In your sketchbook:  C:\Users\[your computer name]\Documents\Arduino\libraries
Arduino Install:  C:\[install path]\arduino-1.5.2\libraries
Logged

//LiNK

Earth
Offline Offline
Sr. Member
****
Karma: 13
Posts: 312
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

One thing I noticed when using this library: Instantiating the rtc object seems to hang the program for about 2 seconds. This didn't work for me in the project I'm working on because it needed to start processing input right away. I didn't trace down why it took so long. Is that normal to take 2 seconds?
Logged

Germany
Offline Offline
Full Member
***
Karma: 10
Posts: 221
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

One thing I noticed when using this library: Instantiating the rtc object seems to hang the program for about 2 seconds. This didn't work for me in the project I'm working on because it needed to start processing input right away. I didn't trace down why it took so long. Is that normal to take 2 seconds?

If you give me a hint may I can help is it this part?

Code:
// Select the Slowclock source
//RTC_clock rtc_clock(RC);
RTC_clock rtc_clock(XTAL);

or does it came from this line?

Code:
rtc_clock.init();

By the first part it happend about the external xtal to swing-in
Logged

Earth
Offline Offline
Sr. Member
****
Karma: 13
Posts: 312
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It seems to happen at this line:

RTC_clock rtc_clock(XTAL);

You're saying that the delay is waiting for the crystal to settle? Shouldn't using the crystal take less than 2 seconds?
Logged

Germany
Offline Offline
Full Member
***
Karma: 10
Posts: 221
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It seems to happen at this line:

RTC_clock rtc_clock(XTAL);

You're saying that the delay is waiting for the crystal to settle? Shouldn't using the crystal take less than 2 seconds?

In my words NOOOOOOOO!!!

The internal RC is extremly unstable about counting on time he is too slow. You will loose time.

May use the Teensy 3 who sets faster up in combination with the time lib
« Last Edit: May 14, 2013, 05:52:21 pm by Markus_L811 » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
i'm an engineer of telecommunnication
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hai Markus_L811,,thanks you very much for your library..it more simple better than external RTC...i have tried it but makus
when i tried it the example "Due-RTC_SAMPLE "...first time set rtc_clock.set_time(10, 29, 49) and then the clock is turn on...but the problem when i close the "serial view/serial monitor" and open again serial "serial view/serial monitor" the time clock set again in 10, 29, 49...it does'nt continue with when we open the "serial view/serial monitor" first....in my research planning i will make this rtc library to schedule the sending data of sensor...
every 20 minute send data of accelerometer sensor
every 10 minute send data strain gauge sensor

plese help me for this research...
thank you very much for your attention and your library.. markus,,god bles you..
« Last Edit: October 31, 2013, 04:12:11 am by muntaqo » Logged

Laguna Hills, CA 92653
Offline Offline
Full Member
***
Karma: 0
Posts: 112
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Opening the Serial Monitor resets the Due, which resets the uP
using both the Reset inputs, and one of these two inputs resets
the RTC and other (unknown by me) stuff.

So, powering on, uploading a Sketch, or opening the Serial Monitor
all cause the RTC to be reset.  If the Due will run in a situation where
it is always on, the RTC could be useful, if your Due board has the 32 kHz
crystal installed.  Mine have it, but some pictures of the board show it missing.

To be really good support, you need to be able to read and write
the whole RTC-seconds value in one read (or one write). 
I am not sure that this RTC library does that.

Has anyone looked?
Logged

Cheers, Gary
Due for controlling Electric car charging.
Nissan LEAF - Mini Quick Charge (mQC)

Offline Offline
Newbie
*
Karma: 0
Posts: 4
i'm an engineer of telecommunnication
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 smiley hem,,,oh i see i see,,it is the reason why the time is reset again,,,so i have to make it always on,to solve this problem..Thank you very much..your information help me
Logged

Pages: [1]   Go Up
Jump to: