Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

digital I/O and Nyquist

hola out there,
i have a very basic question:
when i have digital data let´s say at x HZ. Do i need to sample it (mabe the word "input" is better to use in this context) it at 2x Hz (to be compliant with Nyquist) or is it sufficient to "input" the data at x HZ??? If so why?? And if so, dos it play a role at which point of the data stream the input actually takes place ??

gracias
0 Kudos
Message 1 of 3
(3,394 Views)
Well, there is a mathematical correct anwser to this question regarding the theory of fourier transformation. To be correct please look this up in mathematical lecture book.
But I choose a more intuitive way to explain the Nyquist theorem in my thesis.
Lets look at "adwandlung.jpg". You want to measure the red sine wave with a frequency of x Hz meaning you want to see this curve as smooth as possible on your screen. Presuming that you connect every measured point with a line you will get just with 2x Hz sampling rate (blue bars) not a very smooth curve (see blue one in "adrekonstruktion.jpg"). But in this case is ideal! Lets presume your sampling trigger is shifted about one half pi. Then you would a zero line instead the sine wave that you want to
mesaure!
As a rule of thumb one uses a sampling rate of 10 times higher then the requested highest signal frequency (see green bars and green curve in the pictures). This leads to satisfyng results.
But of course, the smoother the curve on the screen should be the higher must be the sampling rate to get a higher point rate for reconstruction.

Hope this will answer your question.

Stephan
Download All
0 Kudos
Message 2 of 3
(3,394 Views)
Hi studentin,
The answer depends on what your data looks like. The Nyquist theorem describes the required sample rate for reproducing the original waveform's frequency without aliasing. Let's say your digital data is an 8-bit pattern that represents a sine wave (perhaps the signal went through an 8-bit Analog to Digital converter). If you will need to analyze that data later to determine the frequency of the original sine wave, then you must sample at more than 2x the frequency of the original sine wave. (In this scenario, the A/D converter usually determines the sample rate).

If the digital data does not represent some kind of waveform as described above, then you do not need to follow Nyquist; you only need to sample at the rate of the data itself.
For example, if you are sampling the data pins from an EEPROM, then you need to sample at the same speed as the data is being clocked out of the EEPROM. You must do this to make sure you don't miss any of the data values.

I hope that helps!
0 Kudos
Message 3 of 3
(3,394 Views)