Unfortunately, I haven't built a bootloader into the DSP or the PIC18 code so if you want to program the firmware you'll need a programmer. I use a PICKIT 3 which works for both processors, the new version of MP-LAB says to can't program the 18F45K22 with a PICKIT 2 but it will program the DSPIC. Anyone who wants to work on a bootloader is welcome.
To program the PIC18 (U8) remove the 'ENCODERS' plug (J10) and plug the PICKIT 3 into 'PGM' (J9). You can't use the PICKIT 3 to power the processor so the DSP-610 needs to be on to program the PIC18 (U8). After programming is complete, disconnect the PICKIT 3, reconnect the 'ENCODERS' (J10) and cycle the power.
To program the DSP (U9) connect the PICKIT 3 to 'PGM DSP' J11. You can't use the PICKIT 3 to power the processor so the DSP-610 needs to be on to program the DSP (U9). After programming disconnect the PICKIT 3 and cycle the power.
The files section has a cheat-sheet that should the display and switch functions.
Version Information:
Baseline:
Basically unchanged sine my trip to ARRL in March. It has a unique filter for SSB TX rather than using one of the RX filters. I recently changed the audio filters from lowpass to bandpass since a little residual DC on the MIC input was causing some carrier to show up in the output. This should help.
The PIC18 code hasn't changed for a while. It's got lots of program and data memory so someone with time on their hands could port an electronic keyer in there. The other issue is that it doesn't read the calibration info from the SI570 at start-up. I made hard coded adjustments for the fine frequency tuning, It might be nice to have the PIC read the cal data and make the necessary adjustments or have a setup somewhere that allows the user to fine tune the frequency.
DSP-610 Programming Notes of N4BKT
for DSP-610 Transceiver designed by Jim Veatch, WA2EUJ published August 2012 QST
These are my notes on the programming for the project. Hopefully this will be useful to others who are perhaps neither a coder nor PIC expert. This was my first experience with the PIC18 and dsPIC as well as this IDE. This is not an official documentation of the project and is not approved by Jim Veatch.
In order to program the PIC18 and dsPIC you’ll need a compatible programmer and you’ll need to be able to compile the code released for the project.
The PICKIT3 is required to support the PIC18F45K22 used in the rig. PICKIT2 will not work.
To download the MPLAB IDE from microchip.com you need to create a free account. You may download a 60 day full-function evaluation version which continues to function with reduced optimization after the eval period (you should wait until you are ready to program before installing). The IDE allows you to directly open the project files and simply click “Build All” to compile the code, and the IDE also controls the PICKIT for programming.
On Windows 7 I downloaded MPLAB IDE 8.87: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002 for other platforms (and moving forward) MPLAB X is the choice: http://www.microchip.com/pagehandler/en-us/family/mplabx/#downloads for the present, I chose to use the IDE and compiler the project was originally built upon to reduce the possibility of issues.
Once the IDE is installed, you may browse to the folder containing the DSP-610 PIC code and open the “DSP-610 PIC18.mcw” in MPLAB. Once the project is open, you should be able to go to Project-->Build All and after a few seconds (and several warnings of “suspicious pointer conversion”) you should see BUILD SUCCEEDED.
Once you have succeeded in building the PIC code, you can connect your PICKIT3 (or clone- I used the OLIMEX PIC-KIT3 from Mouser.com) to the USB port and point to Programmer-->Select Programmer-->PICKIT3 and the Output window should report the PICkit3 detected (you may also see a message that new firmware is required which will be downloaded). You should see a window warning you to be sure that you have a 5V device attached and not a 3.3V - of course you have not hooked the port up yet, so you can read the warning and click OK to dismiss. After this you will get a “device mismatch” error stating the target device ID does not match expected. This is normal when no device is connected.
Most PICkit3 clones can not source enough current to run the entire 5V rail so next you will remove the encoders plug, then power up the DSP-610 to provide power to the target PIC18. Pay careful attention to the polarity of you pins connecting to the program header PGM (J9) My OLIMEX programmer has 6 pins on the plug, while the header has five. The sixth pin is not used but be certain you do plug it in correctly. Once you plug the connector in, you’ll get the target device voltage warning, dismiss, click Programmer-->Connect and you should see “Device ID Revision = 00000005” after this (you did a Build All, right). You can point to Programmer-->Program -- and if all is well in a few seconds you’ll see “Programming/Verify complete” - now we get to program the dsPIC
The dsPIC requires the C30 compiler which is not installed as part of the default MPLAB IDE. You may open the dsPIC project but if you try to compile without having first installed it you will see the error below.
Note the “Use This” is blank.
You need to download the C30 compiler separately at microchip.com, then we can set the tool location- as on Windows 7 we do not use “Program Files” but rather use “Program Files (X86)”
Go to Microchip’s site and get the MPLAB C Compiler for PIC24 and dsPICv3.31 - It shouldn’t hurt to install for dsPIC and PIC24 so that is what I did. I also chose the option for versioned folders for future compatibility with MPLAB X when it matures.
Now that you have the C30 compiler installed, reopen you dsPIC project in MPLAB IDE and do a “Build All” - you’ll get a BUILD FAILED error of course- so let’s see what we need to correct.
Note this time there is a path in the “Use This” box. Click “Use This” and build all again. On the second go, you’ll get a linker error.
Click “Use This” and then you should see a ASM error.
Click “Use This” to accept the suggested location for the PIC30 assembler.
If you ever need to check or change these in the future, point to Project-->Set Language Tool Locations
On my computer(s) the correct location for C30 is:
So now that everything is configured in MPLAB, you should get a successful build. Connect up as before with the PIC except using the PGM DSP (J11) header, power the board, connect, program/verify, remove the programmer and reboot. If all is well, you should hear some noise provided everything else is built and connected.
Good luck with your build.
Bill Laakkonen
N4BKT