K3JLS DDS VFO Software
The program itself is just about 2,300
long and resides on a Freescale MC908JL16CPE chip. I've tried to
ample comments in the assembler listing to show how the program works.
When first powered on, the program initializes all the variables that
will be used in processing. Variables include the input /
ports, memory location names and the like. The program sends
serial data to the DDS chip to load the initial frequency (5,000.00
khz), and then starts running a continuous tight loop which both checks
the status of the encoder and the panel mounted (formerly SPOT) button and the SPLIT button (if installed).
Concurrently, periodic interrupts occur to see if
RX-OT switch has been operated and - if it has - to measure its
deviation from 'top dead center'. If changes are detected (by
processor's A/D converter function), the DDS circuit is tuned
accordingly. These interrupts occur 10 times each second, and
can hear the discrete steps if you turn the offset control quickly
while listening to a CW signal.
was given to activating the RIT function solely by turning it from its
center position and then lighting an LED as has been done in at least
one other DDS VFO design. In this manner, the M/P could measure
(via the A/D Converter) the deviation from RIT center (which would be
hex 7F) and then adjust the receive frequency accordingly. This
would also be an easy way to introduce a 'dead band' region by applying
a 'tolerance' to the 7F value. However, I decided to activate the RIT
function with a discrete switch, which is the way RIT is deployed in
many other radios. If - for example - one of the parties in a
round table were a bit off frequency, just activating the switch with
the RIT tuned to his or her frequency would be - in my opinion - a lot
easier than trying to adjust the RIT control itself for each
Another interrupt measures the number of tuning encoder 'pegs' within given
periods. When theresholds are reached, the tuning increment
adjusted accordingly. It's very easy getting from one band
the other with a little practice.
radio is 'keyed', it grounds pin 1 on the M/P which is the main
hardware interrupt point. Once done, the M/P suspends the
two interrupts, and - if operating in the split mode - quickly computes
the new transmit frequency and sends
it to the DDS. (If
the radio is operating in the simplex mode, the DDS is not updated).
Any RIT offsets are - of course - suspended.
When the radio goes back into the receive mode, the M/P loads
the former receive frequency which may or may not be offset.
The software runs on a Freescale MC68HC908JL16
flash programmable chip. It was written on the Freescale
CodeWarrior platform which can also dynamically debug the code and
'burn' the M/P's internal EEPROM. The JL16 series has 16K of
memory space, but only about 2.3K is used for this application.
The code could probably be significantly downsized (by using
subroutines), but with all this memory - why bother??
If you want
to use the CodeWarrior IDE (Integrated
Development Environnment) package, here's a link
so that you can download CodeWarrior 5 - an older
works well with Windows XP. It's the one that I
the code for this and for the other projects shown on my website.
This zipped file is over 282 mb long and will take a long
download, but it's worth it. It's self extracting and
While this version will not work with
Windows 7 or 8, you may either download the latest CodeWarrior version
from Freescale which is Windows 7 / 8 compatible (and then learn how
to use it - ugh!), or partition your
Windows 7 / 8 computer so that it will accept a concurrent copy of XP
and then load CodeWarrior 5 onto
After you've downloaded and installed Code Warrior 5, you can then
download the DDS program itself. It's contained in a zipped
called DDS.zip. Just
place file this in your My Documents and you're good to
go with Code Warrior.
This will afford you the opportunity to see the complete code
along with the comments and program a copy or copies for your own use.
can also personalize the code for your own purposes - - have fun!
To program the M/P you'll need to build a simple MON08 type
programmer. Instructions are provided in the MC68HC908JL16
If you just want to program the chip yourself without downloading the
CodeWarrior IDE, then here's a copy of the S.19 file
which you can use with your favorite programmer.