Arduino ICSP

Ammar Ali Apr 29, 2021
  1. Using ICSP Pins to Program AVR and Arduino
  2. Using ICSP Pins for Communication Between Two or More Arduino Boards
Arduino ICSP

In this tutorial, we will discuss the use of ICSP pins present in Arduino. ICSP stands for in-circuit serial programmer, also known as ISP.

Using ICSP Pins to Program AVR and Arduino

Arduino is a board that has a microcontroller, a programmer, and some safety components. There is a bootloader in every Arduino provided by the Arduino team itself, which communicates with the PC and gives instructions to the microcontroller to perform some task like BIOS present in a motherboard. The bootloader is preprogrammed and is inside the microcontroller’s flash memory. When you connect the Arduino with your PC, the bootloader waits for a sketch to be uploaded to the microcontroller, and if no sketch is provided, the bootloader will run the already present sketch inside the microcontroller flash memory. Sometimes this bootloader gets crashed, and the Arduino cannot communicate with the PC. If this is the case, or you want to program the bootloader or program another microcontroller, you can use another Arduino board to do this. First, you need to check where the ICSP pins are on your Arduino board. You can check the pin configuration of your Arduino board for that. For example, if you want to program the bootloader of an Arduino UNO with another Arduino UNO. Connect the two Arduino UNOs as shown in the figure.

Arduino ICSP

The first step is to set the programmer Arduino as ISP. To do this, go to the tools tab in Arduino IDE and set the programmer as Arduino as ISP. The next step to use an example code present in the Arduino examples section as ArduinoISP. In this example code, you can see many comments which will guide you through setting out different parameters. This code also supports three LEDs which are used to check the operation of the process. For example, the middle LED indicated if there is an error in programming. The next step is to burn the bootloader. To do this, you can go to the Tools tab and select burn bootloader. You can set different parameters of bootloader like how much memory is reserved for the bootloader and disabling reset. So make sure to read the documentation of your Arduino board before doing this. You can also use this method to program other AVR microcontrollers because, in some projects, you don’t need a board; instead, you only need a microcontroller like a PIC microcontroller.

Using ICSP Pins for Communication Between Two or More Arduino Boards

If you are making a project where you need more than one Arduino board, and you need them to communicate with each other or if you want to control some Arduino boards with a master Arduino board. In these cases, you can use the ICSP pins for communication.

Author: Ammar Ali
Ammar Ali avatar Ammar Ali avatar

Hello! I am Ammar Ali, a programmer here to learn from experience, people, and docs, and create interesting and useful programming content. I mostly create content about Python, Matlab, and Microcontrollers like Arduino and PIC.

LinkedIn Facebook