RTC library

What could be included in further releases, or for the forum.
Nutsy
Posts: 241
Joined: Sun Jul 24, 2016 4:26 pm

Re: RTC library

Post by Nutsy » Sun Mar 26, 2017 12:43 pm

ok iim intrigued... I would like a RTC on my speedo project... i was going to use one of those external RTC modules... But I remembered some one saying there is one built in.

I guess you supply power to vbat, to keep the rtc powered when the rest of the MCU is unpowered?
How much voltage? 1.5? 3v?

And im assuming there isnt already a functioning library?

Hence this thread? :D

I guess a little guide would be useful... or if you know of any documentation I can read even better :D

Sorry for the dumb post, im fairly tired and backs in pain............ (crippled)

User avatar
martinayotte
Posts: 1229
Joined: Mon Apr 27, 2015 1:45 pm

Re: RTC library

Post by martinayotte » Sun Mar 26, 2017 1:02 pm

The specs mentioned Vbat should be between 1.8V and 3.6V.
I'm personally using a SuperCapacitor instead of a battery.
The library on github is working fine.

Nutsy
Posts: 241
Joined: Sun Jul 24, 2016 4:26 pm

Re: RTC library

Post by Nutsy » Sun Mar 26, 2017 2:12 pm

Oh which github? Rogers STM32?

User avatar
martinayotte
Posts: 1229
Joined: Mon Apr 27, 2015 1:45 pm

Re: RTC library

Post by martinayotte » Sun Mar 26, 2017 2:25 pm


Nutsy
Posts: 241
Joined: Sun Jul 24, 2016 4:26 pm

Re: RTC library

Post by Nutsy » Sun Mar 26, 2017 2:53 pm

thankies

Nutsy
Posts: 241
Joined: Sun Jul 24, 2016 4:26 pm

Re: RTC library

Post by Nutsy » Mon Mar 27, 2017 11:29 am

Only asking as I cant play with it for a few days......

Does the built in rtc work off unix time? So you can derive a date from the number? Or is it simple 24 hour clock and nothing else?

i see the gettime function seems to be call to check the time. But I dont see any get date or anything else...

User avatar
ahull
Posts: 1650
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: RTC library

Post by ahull » Mon Mar 27, 2017 11:47 am

Nutsy wrote:Only asking as I cant play with it for a few days......

Does the built in rtc work off unix time? So you can derive a date from the number? Or is it simple 24 hour clock and nothing else?

i see the gettime function seems to be call to check the time. But I dont see any get date or anything else...
The RTC can be set using a Unix Time Stamp. If you look in the my github code for the o-scope one of the serial commands I implemented sets the clock using a unix time stamp, and so far as I recall, somewhere I gave an example of how to do this directly from the command line on a Linux box, so you could probably use that example for your purposes.
- Andy Hull -

Post Reply