Go Down

Topic: GPS-based frequency counter library (Read 893 times) previous topic - next topic

Jack Christensen

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.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Udo Klein

I think you should disable timer0 in order to avoid spurious glitches.
Check out my experiments http://blog.blinkenlight.net

Jack Christensen


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.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Go Up