Program PICs with a PICkit2 on Windows

From Curuxa

Contents


If you want to burn your programs (.hex files) into your microcontrollers from Windows using the PICkit2 but without the need of MPLAB, you can do it using the PICkit2 software programmer. It's a simple program that allows you to choose a .hex file and burn it directly in the microcontroller using a PICkit2 connected by USB.

Installation

  • Go to PICkit 2 website, and download PICkit 2 V2.XX Install
  • Unzip the file and install it

Using it

  • Plug your Main Board to yout PICkit 2
  • Plug your PICkit 2 to your computer
  • Run the PICkit2 software programmer
  • Your PICkit 2 should be automatically detected. If not, go to Tools -> Check Communication

Write program

To burn a program (stored in a .hex file) into your microcontroller...

  • File -> Import Hex File
  • Choose your .hex file
  • Click on Write

Sometimes the verification fails, but the program is properly burnt anyway.

Read program

You usually don't need to do this, but if you want to retrieve the full program stored in the microcontroller...

  • Click on "Read"
  • File -> Export Hex File

Run program

Once you have your program burnt into the microcontroller, you can power your circuit from the PICkit2, so the program will start running:

  • Set the voltage at which you want to power the circuit at "VDD PICkit 2" (right below Microchip's logo)
  • Check the "On" box

As long as the "On" checkbox is checked, yout circuit will be powered at the voltage you've just specified.