Pages: [1]   Go Down
Author Topic: What is the ICSP pins for?  (Read 27110 times)
0 Members and 2 Guests are viewing this topic.
Philippines
Offline Offline
Jr. Member
**
Karma: 5
Posts: 81
Graduating Computer Engineering Student
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Could anyone tell me what are the ICSP pins for? smiley

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

- Migs
Logged

Don't stop Learning.

Arduino Projects:

SMS-Based LED Matrix Display
http://youtu.be/WVhDr5CNxwE

California
Offline Offline
God Member
*****
Karma: 14
Posts: 629
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-wink
Logged


Philippines
Offline Offline
Jr. Member
**
Karma: 5
Posts: 81
Graduating Computer Engineering Student
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Quote
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
Logged

Don't stop Learning.

Arduino Projects:

SMS-Based LED Matrix Display
http://youtu.be/WVhDr5CNxwE

Show Your Work
Offline Offline
Edison Member
*
Karma: 14
Posts: 1089
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

http://allaboutee.com/2011/05/11/how-to-program-an-avr-microcontroller/
Logged

I have only come here seeking knowledge. Things they would not teach me of in college.

California
Offline Offline
God Member
*****
Karma: 14
Posts: 629
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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:
http://www.gammon.com.au/forum/?id=11635

Quote
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:

http://www.gammon.com.au/forum/?id=10896

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


Philippines
Offline Offline
Jr. Member
**
Karma: 5
Posts: 81
Graduating Computer Engineering Student
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Don't stop Learning.

Arduino Projects:

SMS-Based LED Matrix Display
http://youtu.be/WVhDr5CNxwE

0
Offline Offline
Shannon Member
****
Karma: 206
Posts: 12062
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 533
Posts: 26952
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: