On 7/6/06, Gerhard Fiedler wrote: > Mark Rages wrote: > > > On 7/6/06, Gerhard Fiedler wrote: > >> How do you get these numbers? 4 MHz clock gives 1 MHz instruction cycle. 10 > >> instructions per loop (Russell: 10 "lines") gives ~80 kHz loop frequency. > >> If I see this correctly, that's one change in the output pin every 12.5 us, > >> which gives a max output frequency of 40 kHz. > >> > >> But now the resolution... Those 40 kHz have basically a resolution of 1 > >> bit: they are either on or off. If you want 14 bit resolution, the max. > >> frequency is much lower -- around 2.5 Hz. Or not? > > > > It's more complex than that, because of the noise shaping. The > > resolution approaches infinity* at DC, > > Right... but only if the time approaches infinity. Time marches on! > Yup. But still... the original claim was: > > >>> A 14-bit delta-sigma DAC should be able to reach 80 kHz on a 4 MHz 16F. > > 14 bit resolution means about 84 dB SNR. Given a 1st order converter > (remember the 10 instruction cycles), that means that the sampling > frequency has to be about 1000 times the Nyquist frequency of the signal. > With 100 kHz sampling frequency, the Nyquist frequency becomes 100 Hz, the > max. signal frequency 50 Hz. A bit off my guesstimate, but also quite a bit > off the claimed 80 kHz. > I took the 80 kHz to be the clock frequency, not the output bandwidth. So with 80kHz clock freqency the max signal frequency for 14-bits is .8*50= 40 Hz. Compare this to a PWM with an 80 kHz clock. To get 14-bits, you could set the output frequency to 80/(2^14) and vary the pulse width from 0 clocks to 2^14 clocks. Bandwidth is (80/(2^14))/2, or 2.44 Hz. This is the estimate you gave, so I was trying to explain that DSM is a different bandwidth tradeoff than PWM. > I haven't quite understood yet how a 0-order and a 1st order DAC differ... > You mean 1st and 2nd order DSM? They're named after the number of integrators. I learned the difference when writing my RS232 audio project I linked before. The program I'm distributing is only 1st order. I rewrote it for 2nd order and it sounded much clearer, and taught me a little bit about the two algorithms. Regards, Mark markrages@gmail -- You think that it is a secret, but it never has been one. - fortune cookie -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist