Go Down

Topic: Arduino Due RTC Library (Read 6996 times) previous topic - next topic

Markus_L811

Dec 07, 2012, 11:43 am Last Edit: Jan 23, 2013, 10:13 am by Markus_L811 Reason: 1
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

arodrisa

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

codlink


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.
//LiNK

anon10500

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

strafen



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...

codlink

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
//LiNK

Collin80

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?

Markus_L811


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]
// Select the Slowclock source
//RTC_clock rtc_clock(RC);
RTC_clock rtc_clock(XTAL);


or does it came from this line?

Code: [Select]
rtc_clock.init();

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

Collin80

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?

Markus_L811

#9
May 14, 2013, 11:23 pm Last Edit: May 15, 2013, 12:52 am by Markus_L811 Reason: 1

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

muntaqo

#10
Oct 31, 2013, 08:24 am Last Edit: Oct 31, 2013, 10:12 am by muntaqo Reason: 1
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..

garygid

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?
Cheers, Gary
Due for controlling Electric car charging.
Nissan LEAF - Mini Quick Charge (mQC)

muntaqo

:) 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

Go Up