Shown above is the programming pod that I use and have found to be very reliable. Due to space limitations (as well as a lack of knowledge at the time) the TinyCNC-II has a fairly non-standard programming pin configuration. I made an adapter cable from a piece of old ribbon cable and soldered some connector pins to the individual wires to make a cable that gets the job done. If this causes you any teeth gnashing then I do apologize but I hope that the above pictures are enough to get you over the hump.
The pins are a rather snug fit but have not failed (yet) to reprogram the CPU literally hundreds of times for testing, correcting problems and adding new features. The Pickit-3 powers and programs the CPU without the need of an external power supply. Finally, the sixth hole position has no connection installed as that is for a low voltage programming process that I do not use in this project.
NOTE: With Microchip no longer maintaining the PICkit 3 v3.10 programming application software as well as announcing dropping support for the PICkit 3 and PICkit 2 programmers as of the IPE v6.25 application software, I wanted to find other software that I could still use my trusty PICkit 3 programmer with. I was pleasantly surprised to find that the following product fit the bill.
PICKitPlus
(https://pickitplus.co.uk/Typesetter/)
By PICKitPlus Team
The PICKitPlus product offers Windows software that supports my PICkit 3 (as well as the PICkit 2) programmer and looks to function identically to the PICkit 3 v3.10 application software. PICKitPlus Team also continues to update the software and add support for new devices. The PICKitPlus product also offers Linux command line software with an optional GUI interface.
Step #1
Connecting to the TinyCNC-II Board.
Step #2
Set Software for Fast Programming.
Step #3
Set for Verify and Clear Memory.
Step #4
Erasing the CPU.
Step #5
Loading the TinyCNC-II Hex File.
Step #6
Hex File Loaded and Ready.
Step #7
CPU Successfully Programmed.
Step #8
Program Verified in the CPU.
Step #9
Connect a 9 Volt Battery Across the 33 Volt Zener Diode to Test.
The series of pictures above show the steps involved in using the PICKitPlus programming software from PICKitPlus Team to program the PIC18F6722 CPU.
If you first bring up the software and it does not correctly read the chip ID as a "PIC18F6722" (as pictured in the first of the nine pictures above) then there is something wrong with the CPU hardware section of the PCB or the settings in the programming software are not correct.
Please review each panel to ensure that your software is set up the same. If it reads the CPU ID properly you should have no issues programming the CPU.
The PICKitPlus Linux product uses the "pkcmd-lx" command line software.
After the installation of the PICKitPlus pkcmd-lx product, the user should copy the desired hex file into the installation directory and then change into that directory.
NOTE: The very first command the user must issue will be to instruct the pkcmd-lx application to run without root privileges. This command only has to be issued once after pkcmd-lx installation.
Executing the following command should successfully accomplish this.
sudo ./pkcmd-lx-x86_64.AppImage --configure-no-root
Executing the following command should successfully program the TinyCNC-II unit.
./pkcmd-lx-x86_64.AppImage -fTinyCNC-II.hex -3 -w -p18f6722 -mpce
NOTE: Make sure that you select the proper "AppImage" file based on your Linux PCs CPU architecture.
1) A PC with a 32 bit CPU will require running the pkcmd-lx-i386.AppImage file.
2 )A PC with a 64 bit CPU will require running the pkcmd-lx-x86_64.AppImage file.
The user should see a command response similar to the following screen shot once the programming process has been successively completed.
The PICKitPlus Linux "pkplus-gui" complements the "pkcmd-lx" command line software.
The PICKitPlus product line offers an optional graphical user interface for users that might not be comfortable with the command line interface.
After the installation of the PICKitPlus pkplus-gui product, the user should navigate to the install directory and execute the proper pkplus-gui file.
NOTE: Make sure that you select the proper pkplus-gui file based on your Linux PCs CPU architecture.
1) A PC with a 32 bit CPU will require running the pkplus-gui-i386 file.
2) A PC with a 64 bit CPU will require running the pkplus-gui-x86_64 file.
After the installation the user should see file similar to the following picture.
Once the application has been launched many of the application fields will be empty. At this point the user must select the "Files" option and select the location of the "PKPlusDeviceFile.dat" file as well as the location of the CPU type specific PKCMD-LX application
The user should see a settings menu similar to the following.
After completion of the data file and application setup, the user will need to set up the main menu options similar to the following screen shot. Once all fields have been properly setup the "Program" button will become available to select.
The command that will be issued to the PKCMD-LX application will be seen in the "Generated Commandline" display text box and the PKCMD-LX responses will be seen in the "Output Log" display text box.
Once the "Program" button has been selected the programming process will begin and, once the program process has completed successfully, the user should see a resultant screen similar to the following screen shot.