Craig Johnson's MPASM version of the PIC16F84-based DDS VFO
I have been working on converting the PIC code for the AD9850-based VFO (QEX for July, 1997) from Parallax assembler code to Microchip MPASM assembler code. To be more precise, I am working on a version of the AD9850 code that George Heron, N2APB, modified for the PIC16C84 (also in the Parallax SPASM format).
I like the modifications George made, because we happen to be using the same "bargain basement" LED that George struggled with, and his timing modifications should serve us well.
I want the code in MPASM because this is a low level language that is used in the Easy PIC'n books, and because there is so much MPASM code available. (Microchip is the company that designs and manufactures the PIC microprocessors.)
The differences between Parallax SPASM and Microchip MPASM are quite extensive. The Parallax SPASM has some advantages, and may be easier to understand. In fact, many SPASM instructions are actually composites of several MPASM instructions. I.e. SPASM instructions may translate into 2 to 4 MPASM instuctions. Therefore the Parallax code actually has fewer assembler instructions, but of course the end result is the same number of machine instructions.
I tried several automatic conversion routines, but they were not satisfactory to me.
I finally did a complete disassembly from the Hex file, which converted the Hex code into MPASM symbols. However, this form was not readable, so I edited the MPASM file to put back the original comments (plus some of mine), add the standard headers that were needed, add symbolic names for variables, and to substitute the symbolic names for the hexidecimal numbers throughout the code. The result is a file of symbolic code which runs under Microchip MPASM and generates EXACTLY the same Hex file output as George's SPASM code.
Now I can read it and start tinkering with it. Lots of mods that I am waiting to try.
(Go back to the 9850 DDS VFO page & downloadable software)