Installing an Arduino Bootloader
Connecting the Programmer
In-Circuit Serial Programming (ICSP)
It’s very uncommon to program ICs before they are soldered onto a PCB. Instead, most microcontrollers have what’s called an in-system programming (ISP) header. Particularly, some IC manufacturers, such as Atmel and Microchip, have a specialized ISP method for programming their ICs. This is referred to as in-circuit serial programming (ICSP) Most Arduino and Arduino compatible boards will have a 2x3 pin ICSP header on them. Some may even have more than one depending on how many ICs live on the PCB. It breaks out three of the SPI pins (MISO, MOSI, SCK), and power, ground, and reset. These are the pins you’ll need to connect your programmer to in order to reflash the firmware on your board.
Here we have the Arduino Uno R3. It has two ICSP headers: one for the ATmega16U2 and one for the ATmega328. To reflash the bootloader on this board, you would use just the ICSP header for the ATmega328.
On some smaller boards you may not see this connector, but the pins should be broken out elsewhere. Whether you’re using an SMD IC or a DIP IC, the ISP pins should be accessible in one form or another. Some boards might only have test points for the ISP header. If this is the case, you may want to consider getting an ISP Pogo Adapter. This kit allows you to temporarily make a good connection with test test points in order to reprogram your IC.
ISP Pogo Adapter Kit Fully Assembled. You can connect any of the programmers we mentioned in the previous section to this board.
If you are having trouble finding the ICSP pins on your particular Arduino board, you can consult this website for detailed pinouts of most Arduino related ICs and then some.
Once you have located the six ICSP pins on your board, it’s time to hook up your programmer to the board. You can use a programming cable to connect the two, or, if you don’t have a cable, you can just use some male-to-female jumper wires.
If you are using a programmer such as the MKII or the Pocket Programmer, your setup should look something like this:
Click for larger image.
Or, if you’re using the Arduino as your programmer, it should look like this:
Click for larger image.
Here’s a table to help clarify which connections go where.
|Arduino as ISP||AVR Programmer||ISP Header||ATmega328||ATmega32U4|