Measuring the frequency of a digital signal in hardware can easily be accomplished with a counter. An analog signal can be acquired and analyzed in software to determine its frequency. However, in many situations it is desirable to measure the frequency of an analog signal in hardware. A counter cannot be used to directly measure the frequency of an analog signal. However, by leveraging the functionality of a multifunction DAQ device’s analog trigger, a counter can be used to measure the frequency of an analog signal.
Multifunction DAQ devices that support analog triggering contain an internal digital signal that is high whenever the trigger channel meets the specified trigger condition. This signal is the analog trigger circuitry output (ATCOUT). It can be routed both internally and externally. Routing ATCOUT to the source or gate of one of the device’s counters allows it to be analyzed in hardware.
Figure 1: Analog Signal and Corresponding ATCOUT
To measure the frequency of an analog signal in hardware, the multifunction DAQ device’s analog trigger should be configured to trigger each time that the signal is above (or below) a voltage level that is reached once per period. With this configuration, ATCOUT will pulse once per period of the signal. Routing ATCOUT to the gate of a counter allows its period to be determined. Because the frequency of a signal is the reciprocal of its period, the frequency of ATCOUT is now available, and this is also the frequency of the analog signal.