Pages: [1]   Go Down
Author Topic: GPS-based frequency counter library  (Read 659 times)
0 Members and 1 Guest are viewing this topic.
Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 71
Posts: 3511
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't own a frequency counter, but I was interested in checking accuracy of system clocks and also RTCs. I'd seen a couple frequency counter sketches around, but they used the system clock as their time base. I thought that by using the 1Hz signal from a GPS receiver I could achieve pretty good accuracy. This library seems to do the trick, but of course I have no way of verifying accuracy, so a certain amount of hope is involved. I recently calibrated several RTCs with it, so I'll let those run for a while and see how it goes.

Check it out at https://github.com/JChristensen/gpsFreq. Comments welcome as always.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

0
Offline Offline
Faraday Member
**
Karma: 19
Posts: 3420
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I think you should disable timer0 in order to avoid spurious glitches.
Logged

Check out my experiments http://blog.blinkenlight.net

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 71
Posts: 3511
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I think you should disable timer0 in order to avoid spurious glitches.

I saw that in other frequency counter sketches and had it coded in at one point, but frankly I don't see much if any difference. I do see a very occasional reading that seems to be off by a few Hertz and I wondered if that wasn't the cause. Probably would have to make a couple long runs, one with and one without, log the data and compare. I should try that, thanks.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Pages: [1]   Go Up
Jump to: