Our senior project is to build a precision frequency counter which is using GPS signal as a reference. I looked up somebody else project online and found that I have to divide reference signal (normally >7.2 MHz in my project GPS freq. signal is 10MHz) and then it will feed to Microcontroller.

So my question is why do we have to divide reference signal like 100-200 times smaller (the output of my Frequency Divider is ~ 76KHz) before send it to Microcontroller which have speed of 16MHz for example. I assume that I will use this signal as an external clock instead of using internal clock of Microcontroller.

Please help, this is very confusing for me.


1 Answer 1


If you were going to use the GPS signal as a clock input to the microcontroller, then no, you probably would not have to divide it externally if it were already of a suitable frequency. For example, your normally 16 MHz micro will probably run fine on 10 MHz, though you'll have to re-calculate divisors for any fixed-clock communication schemes.

But that's not normally how frequency counters work.

Typically, what happens is that a reference clock is divided down to produce a gating or measurement interval that is the reciprocal of the desired measurement resolution; for example, if you want 1 Hz resolution you must measure for one second. Then, during that period you count cycles of the signal being measured, either clocking from it or by sampling it with something clocked much faster.

If you want to try using the GPS reference as a microcontroller clock, then you can divide it down using a counter/timer inside your micro to produce your gating interval. But beware that your micro may not function if the GPS clock is missing - some chips would allow you to start up with an internal oscillator and switch over if the GPS clock is found, and with substantially more effort, possible switch back if it is lost - that could let you provide a meaningful error message.

It's worth noting that some microcontroller timer/counter blocks can be clocked by external signals as fast or faster than the micro's current clock input, while others must re-sample inputs with their own clock, and so cannot count inputs (either signal under test or reference) which are not a few times slower than the micro's clock).

The most flexible design would probably be one with its own crystal oscillator, and the GPS as an optional input, useful when available, but not mandatory for approximate measurements when not.

  • 1
    \$\begingroup\$ Maybe "to product your gating interval" should be "to produce your gating interval"? You have literally just edited, so I won't. \$\endgroup\$
    – gbulmer
    Commented Sep 25, 2014 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.