Programming the PIC18 / PIC16 Trainer with the PICkit™ 2


  • This PIC Trainer comes with AC-to-DC power adaptor (5V).
  • You need PicKit2 programmer to download the hex file to this Trainer.
  • You also need to know how to use MPLAB to create the Hex file for your program. See the MPLAB tutorial on www.MicroDigitalEd.com

For this edition of the tutorial, we are using version 2.61 of the PICkit™ 2 software. At the time of this writing, the installation was available at this URL.

Warning: Use only AC-DC 5 V power adaptor which comes with the package.

Use the following steps to download the program into the microcontroller using PicKit2 :
1) Plug in the power.
2) Connect the PICkit™ 2 to the trainer board.
3) Move the Switch S10 on the board to PicKit2 position, as shown below.


Figure 1: Move the Switch S10 to PicKit2 position to get the Trainer ready for programming

4) Start the PICkit™ 2 software. (Default location is Programs->Microchip->PICkit 2 v2.61) The software automatically connects to the PICkit™ 2 and determines the chip connected to it. See Figure 2. Also notice that File on top left has the option for importing hex file.


Figure 2: PICkit 2 Software

5) Import the Hex file. On the top left, click on File->Import and you will get the following screen. Locate the Hex file in the open file dialog and click open. See Figure 3.


Figure 3: Import Hex File Dialog

6) Click Write and the software will return the message below:


Figure 4: Click on Write and download is complete

7) If the Download is successful, you can move the Switch S10 to RUN position and press RESET button to execute the code.


Figure 5: The Switch S10 must be moved to RUN position to execute the program