Jump to content
43oh

Recommended Posts

I'm working on incorporating the option to sync time from a GPS source for my VFD clock.  I wrote the code stand-alone for testing - thought it might be useful for some others on the forum.  The code is based on oPossum's RTC clock code.  Date/Time values are BCD.  It could probably be converted to decimal time as well, but BCD works best for my application.

 

A main time variable is available - and would normally be updated through a 1hz timer interrupt, although the interrupt isn't included in this code (I'll probably add that later as an update - but the code to do that is pretty easy).  The rtc_tick_bcd function in time.c can be called from the 1hz timer to perform the needed update.  

 

Enjoy!

 

GPS_Clock.zip

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...