Go Down

Topic: DS1307 time set error (Read 3 times) previous topic - next topic

Paulius

Jan 10, 2011, 10:27 pm Last Edit: Jan 10, 2011, 10:28 pm by Paulakiux Reason: 1
Hi!

RTC worked until I have installed windows 7. Before I was using XP and RTC was setting by uploading program to arduino. I am using RTC library and setting line is:

if (! RTC.isrunning()) {
   RTC.adjust(DateTime(__DATE__, __TIME__));
 }

Now, after uploading program to arduino, RTC shows not real time, like now is 23:25, it shows 6:40. What should I do?

Thanks for help, sorry for my English  :)

PaulS

Code: [Select]
if (! RTC.isrunning()) {
  RTC.adjust(DateTime(__DATE__, __TIME__));
}

This code will adjust (not set) the time/date based on when the sketch was compiled. Is that what you really want to do?

Paulius

Yes, it has been working until I have uploaded program with new OS. If this line is incorrect, what should I write?

Paulius

I think, I will write win XP to my PC... :)

Paulius

Found the problem :) Before I program arduino, I need to get off electricity of RTC and then time sets just 1 time. Smth mysterious  :-?

Go Up