FFT on 10Bits
FFT on 10Bits
(OP)
Hi,
I am using a logic analyzer to view the output on a 10bit ADC and have to verify that the ADC is working correctly by taking the output and reconstructing the input 20kHz square wave by using FFT in matlab. I am having trouble performing fft on a series of 10bits at a time instead of the serial bit stream and thus i'm getting lots of noise. How do i run fft on a series of 10bit numbers instead of a series of 1-bit numbers? Thanks.
I am using a logic analyzer to view the output on a 10bit ADC and have to verify that the ADC is working correctly by taking the output and reconstructing the input 20kHz square wave by using FFT in matlab. I am having trouble performing fft on a series of 10bits at a time instead of the serial bit stream and thus i'm getting lots of noise. How do i run fft on a series of 10bit numbers instead of a series of 1-bit numbers? Thanks.





RE: FFT on 10Bits
An FFT (or even a Discrete Fourier Transform) on 1-bit numbers would be...well, pretty useless.
RE: FFT on 10Bits
RE: FFT on 10Bits
RE: FFT on 10Bits
A good way of seeing if an ADC is working is to write the data into a DAC and look at the DAC output on a scope. This is only a coarse test but checks basic functionality. If you genuinely want to look at the edge response of the ADC then you might consider decimating the data before reconstructing it in a DAC. You can then alias the waveform deliberately by suitable choice of input signal frequency and sample rate to get a nice slow reconstruction speed.
You say that you are going to "reconstruct the square wave" by using an FFT. The time domain data when FFT’ed will give you a frequency domain plot, much like you would get on a spectrum analyser. This will have a dominant tone at the fundamental with decreasing odd harmonics as the frequency is increased. When the harmonic frequency "hits" the end of the FFT it will reflect back into the FFT as a sequence of aliassed harmonics. Basically this just gives a hideous mess which won’t tell you much at all.
RE: FFT on 10Bits
RE: FFT on 10Bits
An FFT would be able to give you insight into the quality of your signal once you have the time domain data correct.
RE: FFT on 10Bits
I wrote a matlab script that converts the serial bitstream into decimals representing 10bit numbers and then plots it. The number is unsigned with the LSB as the leading bit. the thing is, plotting the numbers (10bit stream converted to decimals) i don't get the original square wave it shows slightly rounded highs but no lows. it might be a sampling issue. the signal is a 20kHz wave and the sampling rate of the ADC is 172ksps.
RE: FFT on 10Bits
I do not understand what you meant by no lows. Could you post a few samples in ascii from your MATLAB time domain? That might help. It sounds like you did the hard part, about getting samples from your logic analyzer converted into decimal.
I am guessing you might be dissatisfied with the information you are getting. However, your HW may all be good. You may want to find a way to increase your sample rate, or test (for the purpose of A/D HW verification) with a reduced fundamental of your square wave. Even the 5th FFT line is the 11th harmonic at 220 kHz, requiring a sample rate above 440 kHz. If you can generate a 2 kHz square wave the time domain and the frequency domain may look nicer.
jsolar
RE: FFT on 10Bits
^
| ---- ----
| / | / |
| / | / |
| + | + |
| + | + |
| + | + |
| + | + | ................(repeats)
| + \ / |
|
|
----------------------------------------->
|
if that isn't too clear, they just look like a capacitor charging and followed by a sudden discharge. I will try increasing the sample rate. Thanks.
RE: FFT on 10Bits
Good Luck.
RE: FFT on 10Bits