3 ms·
First, a 80MHz square wave does not have side bands that are significant below 80MHz, only above! And if it's configured for alternating 0/1 bits, a serial port
by cnvogel 11y ago
First, a 80MHz square wave does not have side bands that are significant below 80MHz, only above! And if it's configured for alternating 0/1 bits, a serial port at 80MBaud creates a square wave of exactly 40 MHz.
Furthermore cnlohr doesn't use a fixed square-wave but a variable sequence of pulses. And a single pulse of (1/80Mhz)=12.5ns will have a sinc spectrum. sinc f=(sin f)/f. For an infinitely sharp-edged pulse, this sinc-spectrum basically extends to infinity, for real-world pulses you can expect to see a few harmonics.
https://www.wolframalpha.com/input/?i=fourier+transform+box+function https://www.wolframalpha.com/input/?i=fourier+transform+box+...
cnlohr basically uses the synchronous serial i2s interface, running at 80Mbits/s as a 1bit DAC with a zero-order hold (stretching out a constant voltage over the bit time), so this DAC will recreate anything between 0..40MHz correctly (within the capabilities of its pretty poor quantisation noise and within the first lobe of the sinc-spectrum).
https://en.wikipedia.org/wiki/Zero-order_hold https://en.wikipedia.org/wiki/Zero-order_hold
http://www.ee.ic.ac.uk/pcheung/teaching/ee2_signals/Lecture%2013%20-%20Sampling%20&%20discrete%20signals.pdf http://www.ee.ic.ac.uk/pcheung/teaching/ee2_signals/Lecture%... (last slide)
But, any signal you recreate will, because it's made up of the single pulses with the sinc spectrum, not only have energy between 0...+Fs/2 but also between N-1/2 and N+1/2 times the sampling frequency. There's a obvious trick involving the fact that convolution in the time domain corresponds to multiplication in the frequency domain, but unfortunately I can't really recall it correctly now... so you have to just take my word for it ;)
And that's why, if this "DAC" outputs 1MHz, you also get 79 and 81.
http://www.analog.com/media/en/training-seminars/tutorials/MT-017.pdf http://www.analog.com/media/en/training-seminars/tutorials/M...
(here's a nice graph)
Conversely, when you try to output a sharp pulse on your soundcard, e.g. an audiofile consisting of {zeroes, one sample of 32000, zeroes...}, the output to your headphones will be something like a sinc pulse. The Fourier transform of this since pulse in the time domain will be a box function from 0..half the sample rate in the frequency domain, and hence no higher harmonics will be output.
- xt00 11y agoAh ok, this is great thanks. Yea so outputting a string of 11001100.. would produce a 20MHz waveform, so, then the 3rd harmonic of that is 60MHz, right, so that's what is being picked up? Yea you are right about the harmonics of the ideal square wave, but I was thinking along the lines of a distorted version of the perfect square wave that you get from a typical RF type signal that I've seen on spectrum analyzers many times -- typically you don't have this perfect delta function sitting at your carrier frequency -- it has some extra stuff going on next to it above and below (other than the modulated signal -- not nearly as far away as the F*2 or F/2 type range), but hey I'm not an RF engineer, so I'll just stop speculating in that area. I'm an EE, so I get what you are talking about but thanks for the details--I'm sure plenty of people will benefit from it. Still would love to see a PSD spectrum plot of the output signal from 10MHz to 160MHz or something like that kind of range.