How to Read a Clock Using a Digital Input?

Updated Jan 17, 2019

Issue Details

I'm trying to read a clock signal using a Digital Input Task with NI-DAQmx. What is the sample rate needed to acquire the signal in the best way possible?

Solution

Based on the Nyquist–Shannon sampling theorem, the minimum sample rate needed to acquire a signal is 2 times the frequency of the signal of interest. 

For example, if you want to acquire a 1 MHz Clock Signal, you need at least a sample rate of 2 MS/s. 

Additional Information

If you use a sampling rate smaller than the frequency of the signal, there is a chance the signal will still look like a clock signal. However, the frequency of that signal might be incorrect due to an overlap of the values in the samples acquired.

 

WAS THIS ARTICLE HELPFUL?

Not Helpful