Instructables
Picture of Adding ICSP header to your Arduino/AVR board
So you may have been playing with Arduino's, or rather, Hackduino's. If you made your own Hackduino or similar project, you may be wondering how to add the ICSP header. Basically, using the ICSP header will allow you to use an external programmer to 'upload' software to your MCU (microcontroller unit). This will work for non-Arduino's nicely as well.

ICSP is basically "in circuit serial programming" which allows you to upload software to your MCU without having to pull it out every time.

So if you are pulling your MCU out each time you want to update the software on it and putting it into a programmer, or if you are just testing out your MCU and don't know what you're going to do with it yet, you can add the ICSP pins. If you have tried this before, but can't programme it, I will also tell you how to fix that from my own experience. If that isn't enough feel free to comment and I'll help you as best as I can!

By writing this Instructable (my first, by the way), I assume you have completed an instructable such as the following: http://www.instructables.com/id/Perfboard-Hackduino-Arduino-compatible-circuit/ - thanks jmsaavedra! This should, however, be compatible with any kind of breadboard-connected MCU or any other set up you have, too.

This Instructable tells you how to add a 6-pin ICSP header. The 10-pin header doesn't really add anything in ICSP mode. In step 3 you can also see the pinout for the 2x5 header, which works just the same. All you'd have to do is connect slightly differently - just follow the image and it'll work fine.

Below you will see my slightly unorganised remotecontrol repeater, but hey, it works :)

I'm a bit new to the world of electronics, so if you find a mistake please feel free to comment!
 
Remove these adsRemove these ads by Signing Up
ferdna2 years ago
Is there a standard (ISO or whatever) for the colors that the ICSP connector wires should have? I would like to color code my connector wires.

thank you.
duncan_a ferdna2 months ago

If you use a 'rainbow' ribbon cable then the usual "resistor colour code" system applies:

Pin-1: Brown
Pin-2: Red
Pin-3: Orange
Pin-4: Yellow
Pin-5: Green
Pin-6: Blue

stoduk1 year ago
When creating a circuit that requires ICSP capabilities can you still use the ICSP pins (D11-MOSI, D12-MISO, D13-SCK)?

I had problems trying to reprogram an AVR setup with the basic blinking LED circuit on pin 19 (D13 - SCK) - removing the LED let the ICSP work fine. It probably makes sense that using these three pins for anything else could interfere with the reprogramming - but then that makes it quite a limitation, and one being very aware of.

Obviously an option would be to have a jumper or TPDT (triple pole double throw) switch to change the circuit from being in "run" vs. "program" mode..
stoduk stoduk1 year ago
FWIW it seems 3PDT would be the right way to refer to what I meant - but thinking more I think I just need a 3PST switch. This can just disconnect whatever pins D11/12/13 are being used for, then the ICSP can be attached and will work fine.
varuninnz2 years ago
hey there mate, im a little confused with ICSPs and have 1 question related to my problem.
Basically Im making a device that is using the arduino UNO with 3 differnt shields. All the digital pins have been used up and I need to find a way to save data on usb.

So I was hoping to use the ICSP pins in order to save data using a USB shield like this one. Do you think it will work?
http://www.cooking-hacks.com/index.php/sd-card-shield-v2-1.html

Also if it makes things easier, i've made my own USB socket http://www.instructables.com/id/Cheap-DIY-SD-card-breadboard-socket/

Do you think this can work?

cheers for the help
diy_bloke2 years ago
Great instructable.
Just a question, though it might not be entirely in the scope of this product:
If I have a bootloader in this chip, what will ISP programming do? Will it just overwrite the bootloader?
barttech (author)  diy_bloke2 years ago
Thanks! Basically, yes. If you use ISP to program your chip, anything on it gets overwritten, including bootloaders.

So if you use for example an Arduino, using ISP to program the chip will overwrite the bootloader, and you won't be able to use the Arduino IDE. You can just reprogram it with the bootloader, though. After that you are able to use the Arduino IDE again.

You can actually compile Arduino PDE's to a .hex file and use ISP to put that on the chip, then you have a chip that can't be programmed through the Arduino IDE as well. This saves some ROM and a little bit of start up time, but not really anything huge. This is a bit of a hassle in my opinion, though.

Enjoy!
Thanks for your extensive reply. That helps.

Now if you want to send a hex file to the arduino (the one that acts as ISP), I presuem you vannot do that through the Arduino software but rather you have to use AVRdude or something to send that hex file to the arduino who then sends it to the blank chip.
Nice instructible, I would point out that 'ICSP' is (strictly speaking) a PIC thing, and is a Microchip trademark. I believe Atmel use 'ISP' (In-system programming). But I doubt anyone'll be suing you ;)