Go Down

Topic: Arduino due DS1307 RTC library (Read 7 times) previous topic - next topic

Liad

Hi,

I've tried using RTClib and DS1307RTC libraries but they aren't compatible with the Arduio Due.
I've found this library, but it doesn't use an external RTC.


Any help?



Markus_L811


Hi,

I've tried using RTClib and DS1307RTC libraries but they aren't compatible with the Arduio Due.
I've found this library, but it doesn't use an external RTC.

Any help?

Hello Liad

Did you have an external crystal?

Witch line did you use?

RTC_clock rtc_clock(RC);
or
RTC_clock rtc_clock(XTAL);

The RTC_clock rtc_clock(RC) should work allways.

Markus

Liad

Hi Markus,

I'm using an external XTAL.

I uploaded the Due_Rtc_Simple_Sample once and all worked fine.
When I commented out:

Code: [Select]
//rtc_clock.set_time(10, 29, 9);
  //rtc_clock.set_date(22, 10, 2012);


The date was 1.1.2007


Am I missing something?

Markus_L811


Hi Markus,

I'm using an external XTAL.

I uploaded the Due_Rtc_Simple_Sample once and all worked fine.
When I commented out:

Code: [Select]
//rtc_clock.set_time(10, 29, 9);
  //rtc_clock.set_date(22, 10, 2012);


The date was 1.1.2007

Am I missing something?


No you missed nothing the 1.1.2007 is the the Resetvalue in the Calenderregister (look at the SAM3X Manuel on page 251) so this Date is set after Powering on. I don't know why this Date is set, but there is nothing wrong if it shown.

Liad

So how do I set the time on the DS1307?
I want to set it once, and read the time from it.

Go Up