Hi Harold, I just finished a shortwave receiver myself which uses a DDS for the LO. The general consensus is that DDS does not produce a high-quality LO signal. There are many spurious components to the output signal. There are three main causes for this. Only one of them is particular to DDS: 1) Sampling - when you sample a signal at a rate which is not an integer multiple of the signal's period, then the samples line up at different places in each cycle. The result is that the stream of samples is strictly periodic only with a MUCH longer period than the original signal (think moire pattern). This is not necessarily a big aliasing problem because if you filter the resulting signal so that you pass only the components below the nyquist frequency, you will get back the exact original signal. However, if you are trying to use the samples without filtering (i.e., generating a square wave), it can be a problem. 2) limited DAC resolution - just as in any sampled system which uses an DAC, the DAC effectively adds some distortion to the signal because of its limited resolution. 3) phase word truncation - Most DDSes use a very long phase accumulator word (perhaps 48 bits) and then they feed only the top 14 or 16 into the lookup table ROM to generate the sinusoid. This is to keep the size of the ROM low. However, the result is that, not only do you have the normal time quantization as in #1 above, but there is this pseudo-random offset which is being subtracted from the time variable before it indexes the ROM. This causes phase noise beyond what normal sampling would cause. This may or may not be a problem in your case because it could be that the entire phase accumulator is used to generate the square wave, since that requires only a binary comparator and not a lookup table. In general, all of these problems get better as you increase the ratio between the sampling frequency and the generated frequency. Also, though, there are certain tuning codewords which will produce worse results than others. Often these are less than 1Hz from each other and it would make sense to pick one instead of the other. I also found it useful to vary the clock frequency of the DDS depending on exactly which frequency I wanted to synthesize. That could prevent spurious responses in the mixer in my receiver. As you point out, using a comparator to turn the output sine wave into a square wave (AFTER low-pass filtering the sine wave) would take care of much of what you are seeing. Some DDS chips have a high-speed analog comparator built-in just for this purpose. I mentioned the general consensus against DDSes as receiver LOs. I think that this is not entirely valid. If you use a modern DDS chip (with as little phase truncation as possible), run your DDS clock at a much higher frequency than your output frequency, and do intelligent things in your choice of tuning codeword and/or selection of DDS clock frequency, you can get a pretty clean DDS output. Some newer DDS chips even have anti-spur logic inside. I think they dither in some way to spread out the spur energy into the noise floor without significantly affecting the intended signal, but my memory is a bit hazy. Here's an example of one..yes, it looks like I was right, it is dithering: http://www.analog.com/en/rfif-components/direct-digital-synthesis-dds/ad9954/products/product.html In my receiver, there are definitely some spurious responses left, but they are at a low enough level now that they are not annoying. It certainly is very nice that it doesn't drift much at all! (I used a TCXO as the DDS clock reference). My DDS tunes from 50kHz to 32MHz, using three different main clock frequencies to do so (150MHz, 175MHz, and 200MHz). These are all derived from a 10MHz reference by the internal clock multiplier PLL inside the DDS chip (AD9852). Here are some useful links: http://www.geocities.com/CapeCanaveral/5611/dds.html http://www.edn.com/article/CA415103.html http://www.jstage.jst.go.jp/article/elex/5/21/5_915/_article http://www.analog.com/library/analogdialogue/archives/38-08/dds.html Sean On Tue, Aug 18, 2009 at 10:59 AM, Harold Hallikainen wrote: > I'm looking at using a Direct Digital Synthesizer to generate the local > oscillator for an FM receiver. I'm considering using a D FF as the mixer. > The output frequency would be the difference between the frequencies on > the clock and D inputs. I have an Analog Devices DDS evaluation kit. It > allows you to get a square, sawtooth, or sine wave output. When using the > square wave output, which is the msb of the phase accumulator, I can see a > lot of jitter in the output if the output frequency is not an integer > fraction of the clock frequency. This makes sense, since the addition of > the next step in the phase accumulation will have a somewhat random > relationship to the msb rollover if there is not an integer relationship. > The sine output does not show this jitter, since when the msb of the phase > accumulator changes, the sine output doesn't just change state but, > instead, goes to some appropriate value on the sine wave. > > So, the question is what to drive the mixer with. If I drive it with the > square wave output, the jitter will frequency modulate the output. But, if > the spectrum of the jitter is far above the modulating frequencies, it can > be removed by the low pass filter in the demodulator. > > Another, more complex, approach would be to take the sine wave and change > it to a square wave using a comparator. That would also introduce some > jitter, but not as bad as I'm seeing on the square wave. > > Another approach would be to use an analog mixer instead of the D FF. I > could just use an analog multiplier to do the mix, then filter out the sum > frequency, leaving just the difference. > > So... Does anyone have a feal for the spectrum of the jitter on the square > wave output of a DDS synthesizer? This is running on a 25MHz clock, and > I'm generating frequencies of 2.95MHz and 3.45MHz. > > THANKS! > > Harold > > > > -- > FCC Rules Updated Daily at http://www.hallikainen.com - Advertising > opportunities available! > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist