What is the ICSP pins for?

Could anyone tell me what are the ICSP pins for? :slight_smile:

is this an input pin? for expansion of output pins? thanks!

  • Migs
1 Like

Mostly ICSP it is a AVRtiny programming header for the Arduino consisting of MOSI, MISO, SCK, RESET, VCC, GND. It is often refered to as an SPI (Serial Peripheral Interface) which could be considered an "expansion" of the output, but really, you are slaving the output device to the master of the SPI bus.

So, Master Input and Output depends on the master :wink:

Oh. I see. I've read somewhere that it's also used to burn the bootloader to the ATmega Chip. Is this true?

which could be considered an "expansion" of the output, but really, you are slaving the output device to the master of the SPI bus.

does this mean i can use it to cascade two shields? i'm having problems stacking two shields together (GSM Shield and LED matrix shield) because of pin connections.

  • Migs

With reference to the AVR chips themselves, they are they way you program the chips in-system. You connect the programmer to these six pins somehow - usually over a ribbon cable with two 6 pin IDC headers but you can just use some jumpers too. The programmer can then send the production file (elf file) to the chip. You can get the production file from the Arduino software or from Atmel Studio.

This guy is going from the 6-pin cable to jumpers to the breadboard. I would have just used a IDC socket. But otherwise, this is how you do it. This bypasses the Arduino for a bare $0.80-$3.00 controller which you can add to any project without having a dangling Arduino, but you have to buy the programmer for $35.

Oh. I see. I've read somewhere that it's also used to burn the bootloader to the ATmega Chip. Is this true?

Absolutely, Nick Gammon has a slick sketch that takes care of this:

does this mean i can use it to cascade two shields? i'm having problems stacking two shields together (GSM Shield and LED matrix shield) because of pin connections.

Only if the two shields have micro-controller to slave (unlikely). With two complicated devices, I would recommend an I2C setup:

If you can get your specifics down, I am pretty sure Nick can help you (He is a moderator here...).

thanks for the great tip guys. :slight_smile: just new to the Arduino Community. Lots more to it that just straight up prototyping. haha. getting a hang of it though. thanks again. :slight_smile:

The clue is in the acronym - ICSP = In-Circuit Serial Programming

I would like to just add my point of view:

ISP pins are for ISP programming -

  • the normal way you program Arduino is serial, where on the Arduino is loader program (bootloader), which communicates with you. When you send in the right commands, it read data from the serial connection (usually converted from USB (Universal Serial Bus) by ATmega8u2) and stores the received data to selected program memory. Basically you are communicating with some program on Arduino and the program (which you can modify) stores some data to Arduino flash memory.

  • on the other hand ISP programming first set RESET on target Arduino (or other chip) and holds it. While the reset is hold, Arduino does not work, none of your programs are running. Instead HW encoded pice of code communicate via MOSI (Master Out, Slave In) and MISO (Master In, Slave Out) pins, with timing done by CLOCK pin. It happens behind curtain and Arduino does not know anything about it.

So while normal programming works only with working bootloader and you can modify such bootloader to do things different way (or do nothing usefull at all, if you make mistake), the ISP goes directly to target HW and communicate with the HW, not with something you can change (like the bootloader).

By ISP you can upload anything anywhere and none program (good or botched) on target chip can prevent you from that.


You can also picture the difference as this: - normal way - you open web page on server, put some data inside and politly ask the web page to store them somwhere - the page can do it or reject it o modify the data on the way and store them somwhere else, as the web page wish.

  • ISP - you take out the HDD from the server and simply store the dite directly on it, not asking any system for nothing. Then you restart the server and from its point there are magically new data or program or system or what you just did.
3 Likes

@gilhad,
Check the dates on topics - this one is 18 months old now.
Anyway, ICSP are convenient parallel connections to D11,D12,D13, Reset, Vcc, Gnd.
Useful for programming as you described, but still available for the sketch to use otherwise.

how to connect atmega16 with arduino uno