What is In-Circuit Serial Programming?

Pickit 2 starter kit ICSP

In-Circuit Serial Programming (ICSP) is a form of programming in which a microcontroller is programmed serially, meaning that binary code (1s and 0s) are sent one at a time to a microcontroller and then executed by the microcontroller.

As its name implies, it is a type of serial programming.

Serial programming is programming which which bits that the microcontroller interpret are sent one at a time. This is in contrast to parallel programming, in which a microcontroller receives several bits at once to process.

Several types of microcontrollers and starter kits use in-circuit serial programming (ICSP).

The Pickit 2 Starter kit, which we do tutorials for on this website, uses ICSP. This kit is a custom designed module that receives the binary code file created by the compiler via the PC USB port.

You may know from programming that you first write code at a high level such as a C program. After when you want this code to be run by a microcontroller, it must be compiled. This compiled code is what the microcontroller is able to understand. The compiled code is essentially binary code, which are a list of 1s and 0s. When this compiled version is created, the binary file is downloaded to the microcontroller.

The Pickit 2 starter kit comes with a programmer that generates the electrical signals that the Microchip PIC needs and the binary file is downloaded to the program memory space of the microcontroller, which in this is the PIC16F690 microcontroller.



Shown below is the in-circuit serial programming (ICSP) connector of the Pickit 2 Starter Kit:

ICSCP connector

As you can see, the ICSP connector is the 5-pin connector at the end of the development board. It plugs into the PIC programmer, as shown below so that the microcontroller on the board can be programmed.

Pickit 2 starter kit connections

The PIC programmer has a USB connector so that it can plug into the USB port of a computer. When software is compiled and ready to be run, it travels from the USB into the PIC programmer, then through the ICSP connector, then to the micrcontroller, which then executes the code.

The main advantage to ICSP is the ability to program the PIC in-circuit.

One of the disadvantages, or rather things to be careful about when using the ICSP is the serial communication programming signals can get affected by the circuitry connected to the PIC.

To find out the proper way to connect the ICSP connector of the PIC to the PIC Programmer so that clear signals can be obtained by the PIC microcontroller, see How to Connect an ICSP Interface.

HTML Comment Box is loading comments...