6 frequency measurement – ADLINK PCI-8554 User Manual
Page 45
Signal Connection and Applications • 35
4.6 Frequency
Measurement
To measure a frequency around 1~100 KHz the following steps can be
followed.
Step 1:
This application requires two counters. One counter
is used to generate a pulse with a precise time
interval. The pulse is then used to enable the second
counter (Counting counter). In this example the gate
control is from COUT3 and cascaded counters
configuration is used. The pulse generator is set to
counter 3 (clock from COUT2) and counter 1 is used
to measure the frequency.
Step 2:
The maximum value of the counting counter is 65535.
To measure a 100 KHz signal, the time interval must
be within 1/100 KHz x 65535 = 0.655 seconds. If the
time interval is wider, then the measurement
resolution is better, however, the counting value will
overflow if the time interval is too large. This means
the low pulse width for counter 3 output should be
shorter than 0.655 sec.
Step 3:
Connect the signal to be measured to ECLK1 and
adjust JP1 to allow the debounce function.
Step 4: Connect GATE1 to /COUT3.
Step 5:
The following block diagram illustrates the application.
Write and verify the control program. The frequency of
the signal is:
Frequency = Counting value of counter 1/precise time
interval
Refer to ‘DEMO4.C’ source code.