Programming a PIC

The following are instructions to program a dsPIC33EP128GP502 with the serial bootloader firmware, using a Microchip PICkit3 or PICkit3 clone.

4. Click Operate. Select the Family "16-bit DSCs (dsPIC33)". (This is not strictly necessary, but it narrows the number of devices in the next dropdown down to a few thousand). Select "dsPIC33EP128GP502". (You can start typing to narrow the options further.)

5. Connect the PICkit3 to your computer via the USB cable.

6. Select your tool from the dropdown menu:

7. Click Connect. If you get the following error, it's fine, just click OK:

8. Click on Browse to select a hex file:

9. Navigate to C:\ece3724\pic24_code_examples\hex

10. Select p33EP128GP502_default_bootloader.hex

You should see something like this:

11. If you have a Programming Seat, you can put your PIC into it, push down the handle, and skip to step 16. However if your Programming Seat looks like this, throw it into the nearest trash can (take your PIC out first):

The seat supports programming the following microcontrollers:

PIC16/18XX 40PIN Series devices (except 16F59)

PIC16/18XX 28PIN Series devices (except 16F57)

PIC16/18XX 18PIN Series devices

The PIC 8PIN/14PIN/20PIN family of devices (except 10FXX) 

12. Stick one end of the ribbon cable that came with your PICkit into the breadboard like this:

13. Use 5 wires/jumpers to connect the ribbon cable as follows:

Pin 1 (Black) - PIC pin 1 (MCLR)

Pin 2 (Brown) - 3.3 V

Pin 3 (Red) - Ground

Pin 4 (Orange) - PIC pin 7(PGED1)

Pin 5 (Yellow) - PIC pin 6 (PGEC1)

14. Connect the ribbon cable to the PIC. The PICkit3 connector has 6 holes and the ribbon cable probably has 5 prongs. Connect the cable to the connector, making sure that the hole underneath the V indicator has a prong in it. (The far right if you don't have a V indicator). This is Pin 1. If you don't have a ribbon cable, you can just stick 5 wires into the bottom of your PICkit.

Above: Wicrochip PCkit3

16. Click Program in MPLab IPE. You should see something like this (it takes about 10 seconds):

17. Your PIC is now programmed with the serial bootloader firmware. Unplug the USB cable. Unplug all the wires you connected to your breadboard. (If it makes you feel better, you can click Disconnect first, but it doesn't matter.)