Si4010-C2
17. Frequency Counter
The frequency counter allows the measurement of the ratio of two selected clock sources: a low frequency
clock which defines a counting interval, and a high frequency clock which is counted.
The frequency counter consists of an interval counter, driven by one of the six clock sources. Programming
of the interval counter determines how long the main counter will count one of the two high speed clocks,
LC oscillator or DIVIDER output.
Port
GPIO[3]
Controller
Xtal
GPIO[0]
Oscillator
The block diagram of the frequency counter is in Figure 17.1. When the FC_MODE=0, the frequency coun-
ter is disabled. The only way to disable the frequency counter is to set the FC_MODE=0. The frequency
counter stops counting immediately, so it can be restarted by setting FC_MODE to some functional mode
immediately.
If the frequency counter is enabled by setting FC_MODE to other than the 0 value, it enters the idle state.
To start the counter, the interval counter has to be triggered by writing 1 to the FC_BUSY bit. By writing
FC_BUSY=1, the FC_DONE bit gets cleared as well. The user can also clear the FC_DONE bit in software
after reading the main FC_COUNT value.
Once the interval counter is triggered, and after several clk_sys cycles synchronization delay it waits for
the first rising edge of the clk_int clock, which is the output of the interval counter clock selector mux. It
then enables the main frequency counter FC_COUNT clock. After the interval counter counts the interval
specified by FC_INTERVAL SFR register, another rising edge of the clk_int stops the clocks to the main
FC_COUNT counter. The interval counter edge to edge counting and main FC_COUNT clock enable is
measured very accurately in between the clk_int rising edges.
50
FC_CTRL
LC_OSC/2
0
DIVIDER
1
3
Freq counter
disabled
0
clk_ref
1
clk_osc (24MHz)
2
clk_sys
3
clk_xo
4
RESERVED
5
SLEEP TIMER
5
7
RESERVED
Figure 17.1. Frequency Counter Block Diagram
Rev. 1.0
New count trigger
clk_int
Interval
Counter
FC_INTERVAL
Long word 4 byte result count
read from XREG
FC_COUNT
(LWORD lFcCount)
Interrupt
FC_DONE
FC_BUSY
FC_DIV_SEL
FC_MODE
Need help?
Do you have a question about the Si4010-C2 and is the answer not in the manual?
Questions and answers