PICkit2 programmer connected to PIC Basic

 


 

The PICkit2 programmer is the ICSP programmer from Microchip.
This programmer can be connected to Proton PIC Basic IDE.


 1. First open on your harddisk C:\Program Files.
Make here a new folder with the name Microchip (if it doesn't already excist) and open this folder.
 

2. Make in the folder Microchip a new folder with the name PK2CMD and open this folder.
 

3.  Download underneath PK2CMD_v12091.zip and unzip this folder.

Download PK2CMD_v12091.zip

Special "HitKey version", made by Ninestone
 

4. Copy the unzipped files to the just made C:\Program Files\Microchip\PK2CMD.


First select View in the menu bar from Proton PIC Basic IDE and next
Compile and Program Options...
 


1. Click on tab Programmer and then click Install New Programmer...
 


2. Select Create a custom programmer entry and click Next >.
 


3. Type the name PICkit2 and click Next >.
 


4. Type filename pk2cmd.exe and click Next >.
 


5. Click on Find Manually...
 


6. Search the Microchip folder.
Normally in the Program Files folder.
Open the folder Program Files by double clicking on it.

 


7. Search the foldername Microchip and double click to open this folder.
 


7a. Now click the foldername PK2CMD, click on it so that it becomes blue and click OK.
 


8. Check if there stays c:\program files\microchip\pk2cmd on the screen.
If it's not then you've done something wrong (< Back).
Is it allright then click Next >.

 


9. Fill in the next line (the line on the image hereabove isn't complete):

-PPIC$target-device$ -F$hex-filename$ -JN -M -R -HK

After this click on Finished.
 

The parameters are executed when hit in Proton PIC Basic F10 or F11:
-JN
-M
-R
-HK
= Messages on PC monitor while programming the PIC
= Program HEX from the PIC Basic program into the PIC
= Release MCLR
= Keep window open until a person hits a key (HK = Hit Key)

There are a lot more parameters.
More info can be find in the Readme for PK2CMD.txt file, which stays in the just made PK2CMD folder.

 


10. Finally click OK.


From now on you can run PICkit2 in the PIC Basic IDE
by pressing F10 (with compiling) or F11 (without compiling).
 

F9:
Compile the currently active editor page.
The compile button will generate a *.HEX file.

F10:
Compile the currently active editor page, generate a *.HEX file and run pk2cmd.exe from where you can program the PICmicro.
(F10 is a combination from F9 and F11)

F11:
The F11 key runs PICkit2 automatically, without compiling.