Chronodot: getting time to within less than 1 second?

For RTC breakouts, etc., use the Other Products from Adafruit forum

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
odometer
 
Posts: 98
Joined: Sun Aug 21, 2011 11:01 pm

Chronodot: getting time to within less than 1 second?

Post by odometer »

I wonder about the Chronodot. Is there any convenient way to get the time to within less than 1 second from it? If not, I suppose I could always use something like this:

Code: Select all

get time from Chronodot
1.5 seconds later:
get time from Chronodot again
if the difference between the two readings is:
  2 seconds: we are now in the 1st half of a second
  1 second: we are now in the 2nd half of a second
  anything else: ERROR
After requesting the time from the Chronodot, how long must I wait before requesting the time again? Would 500 milliseconds be too soon? How about 100 milliseconds?

stephanie
 
Posts: 295
Joined: Sat Dec 11, 2010 1:17 am

Re: Chronodot: getting time to within less than 1 second?

Post by stephanie »

In one of my projects I was querying the chronodot every 10mS or so, without any noticable problems.

Basically every pass through the main loop it checked with the chronodot to see if it was the next second yet.

odometer
 
Posts: 98
Joined: Sun Aug 21, 2011 11:01 pm

Re: Chronodot: getting time to within less than 1 second?

Post by odometer »

Thanks for the info, Stephanie.
Really, what I am trying to do is make an animated time display work properly.

Here is a cute video for you to watch:
http://www.youtube.com/watch?v=rxZ26SnzeUQ
(slave clock, impulsed once per minute, showing seconds)

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Chronodot: getting time to within less than 1 second?

Post by adafruit_support_bill »

There is a pin on the Chronodot that can be configured to put out a 1 Hz square wave. You can connect that to one of the interrupt pins to get an interrupt when the second changes.

wd6cmu
 
Posts: 13
Joined: Mon Jan 09, 2012 5:52 pm

Re: Chronodot: getting time to within less than 1 second?

Post by wd6cmu »

My Chronodot support code will poll the seconds register via I2C interface until the seconds change to find the start of the second. After that I just run the IceTube native clock on the 32kHz out of the Chronodot. Seems to work pretty well.

Locked
Please be positive and constructive with your questions and comments.

Return to “Clock Kits (discontinued)”