Quite a few of my electronics projects use an 8-bit Microchip PIC
microcontroller. To avoid repeating the programming instructions
and to get less questions about the subject, I collected the
necessary information to this page to help hobby builders not so
familiar with PICs.
All PIC microcontrollers used in my projects are in-system
programmable. This means that the firmware can be programmed
or updated without removing the microcontroller from the circuit.
For this purpose, there is a connector on the PCB to connect a
programmer to ICSP pins of the microcontroller.
Some of my projects use a bootloader. A bootloader is a small
program in the microcontoller which allows to program or update
the main application to the microcontroller without a programmer.
Usually the updated firmware is transferred to the microcontroller
via some interface that the main application is already using. For
example the JAKADAPTER
uses USB bootloader, which
allows to update the firmware via USB. In this case a software is
needed which uploads the new firmware to the microcontroller. If
you are building a project which uses bootloader, you will anyway
need a programmer to program the bootloader to the PIC for the
On some of my projects there is a 5-pin or 6-pin header on the
PCB, where a PICkit2/3 can be connected directly. In case of 5-pin
header, just match pin 1 (indicated by a triangle on board and
PICkit). Pin 6 is usually not needed, so leaving that out saves
some PCB area.
On some of my projects there is just a footprint on the PCB with
6 small pads and three small holes. In this case you don't need
any connector on the board, but you need a Tag-Connect cable
instead. A suitable cable for ICD3 is TC2030-MCP-NL.
For PICkit2/3 the suitable cable is TC2030-PKT-NL.
The -NL in the code specifies a 'no-legs' version of the cable. If
it is not available, you can also get the 'legged' version of the
cable and just break the legs by bending them with finger. The
Tag-Connect cables are very handy but also very expensive, so in
future projects I'm going to include both the Tag-Connect
footprint and the 5-pin header footprint if there is room on PCB.
There is still one more option: Using a ZIF socket programming
adapter. This is especially useful if you are building the
JAKADAPTER through-hole version board and don't have the
Tag-Connect cable. You can program the bootloader to PIC18F24K50
with PICkit2/3 and a ZIF adapter before soldering the PIC to the
ZIF adapters are available for less than 2 € in eBay.
The PIC of course needs power when it is being programmed. It can
be powered from external supply or from the programmer itself.
When using the PICkit standalone software, it automatically
detects if there is external supply connected and if not, power is
supplied from PICkit. With the IPE software the power from
programmer must be separately enabled from the advanced options
page created 11.2.2017
last updated 13.2.2017 email@example.com