First, a 80MHz square wave does <i>not</i> have side bands that are significant below 80MHz, only above! And if it&#x27;s configured for alternating 0&#x2F;1 bits, a serial port at 80MBaud creates a square wave of exactly 40 MHz.<p>Furthermore cnlohr doesn&#x27;t use a fixed square-wave but a variable sequence of pulses. And a single pulse of (1&#x2F;80Mhz)=12.5ns will have a sinc spectrum. sinc f=(sin f)&#x2F;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.<p><a href="https:&#x2F;&#x2F;www.wolframalpha.com&#x2F;input&#x2F;?i=fourier+transform+box+function" rel="nofollow">https:&#x2F;&#x2F;www.wolframalpha.com&#x2F;input&#x2F;?i=fourier+transform+box+...</a><p>cnlohr basically uses the synchronous serial i2s interface, running at 80Mbits&#x2F;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).<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Zero-order_hold" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Zero-order_hold</a><p><a href="http:&#x2F;&#x2F;www.ee.ic.ac.uk&#x2F;pcheung&#x2F;teaching&#x2F;ee2_signals&#x2F;Lecture%2013%20-%20Sampling%20&amp;%20discrete%20signals.pdf" rel="nofollow">http:&#x2F;&#x2F;www.ee.ic.ac.uk&#x2F;pcheung&#x2F;teaching&#x2F;ee2_signals&#x2F;Lecture%...</a>  (last slide)<p>But, any signal you recreate will, because it&#x27;s made up of the single pulses with the sinc spectrum, not only have energy between 0...+Fs&#x2F;2 but also between N-1&#x2F;2 and N+1&#x2F;2 times the sampling frequency. There&#x27;s a obvious trick involving the fact that convolution in the time domain corresponds to multiplication in the frequency domain, but unfortunately I can&#x27;t really recall it correctly now... so you have to just take my word for it ;)<p>And that&#x27;s why, if this &quot;DAC&quot; outputs 1MHz, you also get 79 and 81.<p><a href="http:&#x2F;&#x2F;www.analog.com&#x2F;media&#x2F;en&#x2F;training-seminars&#x2F;tutorials&#x2F;MT-017.pdf" rel="nofollow">http:&#x2F;&#x2F;www.analog.com&#x2F;media&#x2F;en&#x2F;training-seminars&#x2F;tutorials&#x2F;M...</a>
  (here&#x27;s a nice graph)<p>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.