A DDS Signal generator
By Les MW0SEC
Objectives and requirements
• A stable/accurate signal generator having
a frequency range of:
• 1 c/s – 40 Mc/s
• Amplitude modulation
• Calibrated attenuator giving an output of
100 mV rms max, reducing to -100 dB in
• Easy operation – particularly fine tuning.
AD9850 DDS module with 125 Mc/s clock
PIC controller 16F628.
822 Voltage controlled amplifier.
A commercial attenuator covering 0-100
dB in 10 dB steps.
• TL071 Op. amp configured as stable
oscillator for amplitude modulation.
The AD9850 DDS
• This device produces a particular
frequency by synthesising a sinewave
from a crystal clock.
• The frequency is set by loading a binary
word having a value where:
• fOUT = (Δ Phase × CLKIN)/2^32
• This means binary word = (2^32 /
oscillator frequency in c/s).
How to control things
• I used a PIC (16F628). This is a small fast
microprocessor with two 8-bit busses
which can be configured as input/output.
• Due to the limitations of the device, I
increased the address range with a TTL
• I used a diode matrix to scan the keyboard
The diode matrix
The data lines are held high by the pull-up resistors. When the
address strobe goes low, if a switch is pressed, the data
representing the switch appears on the data bus. The diodes
separate the data paths.
Expand three pins to eight addresses
• The PIC is a simple device intended to
control the likes of washing machines.
Making it do multiple precision addition
and multiplication involves a bit of thought.
• Two number bases are required. Decimal,
for the human interface and Binary for the
internal operations. In addition, the display
requires ASCII characters.
• For each click of the encoder, the
processor has to add/subtract the tuning
increment from the 32 bit frequency word,
multiply the result by 34.359738(ish) and
load the result to the DDS. It then has to
convert the number to decimal, format it
and feed it to the display. This requires a
lot of code…….
• Tuning is achieved by a rotary encoder.
The data output when the shaft is turned gives a sequence of numbers:
0 – 2 – 3 – 1 for one direction and 0 – 1 – 3 – 2 for the other, so any data change
Indicates an increment and by analysing the sequence, we can determine if
The increment goes up or down.
I used an encoder with detents, which gives an output of zero when at rest.
• Now we have accurate frequency, we
need accurate amplitude. This is achieved
by a voltage-controlled wide band
amplifier. A meter indicates carrier level
and this can be set by adjusting the VCA
control voltage. Modulation is achieved by
summing an audio voltage with the control
• So far we have achieved an accurate
frequency at a known level. We need to be
able to attenuate this down to the microvolt level in convenient steps. I cheated
here and used a commercial device which
was in the junk box. This gives a range of
0 to -100 dB in 10 dB steps, The “inbetween” dB’s can be set on the carrier
The attenuator (2)
• The design of an accurate attenuator is a
question of simple arithmetic – all you
need is a network like this:
• The problem arises in terms of screening
to prevent leakage at VHF. This requires
some precision machining for housing.
VCA, Modualtor, PSU.
• Firstly to Stewart (ETF) for inspiring me to
do the project and for sending through
• Secondly to Curtis Preuss, (WB2V) from
whom I ripped off some code in the
• Lastly to AMD for making a really useful