2

I am trying to connect gsm module with my arduino uno. confused about the use of isp and icsp

  • 3
    What GSM module are you using? And what is the cause of the confusion? – Werner Kvalem Vesterås Oct 3 '14 at 10:04
  • i hav a module of sim900a and someone advised me to connect it to ard uno using isp or spi. now i m having queries like can we program using isp? why cant i use spi or i2c? how are they different? xcept i2c which uses uart, right? – user4236 Oct 5 '14 at 19:06
6

ISP/ICSP has no role when utilizing a typical, properly functioning Arduino, as the program code compiled from sketches is instead downloaded via a bootloader (either serial, often behind an on-board USB-serial converter, or else directly USB).

The role of ISP in the Arduino ecosystem is mostly limited to:

  • Loading a bootloader into new chips which do not have one, or have somehow lost theirs (note however that you can buy pre-loaded ATmega328's from many sources at a small premium)

  • As an alternative program loading scheme when the tiny amount of program memory used by the bootloader must be re-claimed for a particularly large sketch

  • Programing alternate targets to which the Arduino libraries have been partially ported, especially resource-constrained ones where the bootloader takes up a larger fraction of the total memory, such as the the ATtiny25/45/85

  • Replacing or modifying the firmware of an on-board USB-serial micro such as the 16u2 on an Uno to perform a different function, such as emulate a keyboard or mouse. However, this chip can also be programmed over its USB interface in DFU mode.

  • Programming other non-Arduino devices used in a project (though these often have a different ISP scheme than the ATmega series).

But a typical project using purchased board(s) will involve none of these.


SPI vs. ISP

As jfpoilpret points out, a very popular way of interfacing chips to a microcontroller is the Serial Peripheral Inteface, or SPI. Like ISP, this is a synchronous (has a distinct clock line) serial interface with a master and a slave, a mode or enable pin, and a distinct data line in each direction. Some Arduinos use MCUs like the ATmega328p which re-use their SPI pins for ISP (with the reset functioning as the mode pin).

In effect, ISP is a sort of special "SPI-like" interface mode for programming an ATmega - often using the master-mode SPI engine of the programer to do the actual transfers. But "ISP" applies only when programming an ATmega - the more generic case of communicating with a peripheral would be "SPI".

It's my impression that most GSM modules use asynchronous serial interfaces (ie, utilizing a UART engine), but there may be some which use SPI or other synchronous schemes, at least as an option.

  • Don't you forget the thousands of devices using the ISP bus as the only way to communicate with them (just like I2C). That makes a common use for ISP in Arduino projects! Although I admit that you don't have to use the 2x3 header for it as you can find MOSI, MISO... on other pins as well, but you could. – jfpoilpret Oct 3 '14 at 15:55
  • 2
    @jfpoilpret - no, that is SPI, not ISP. The ATmega328p happens to use the same pins for both, and they are indeed quite similar - we might consider ISP to almost be a special case of SPI. But SPI is not a case of ISP. – Chris Stratton Oct 3 '14 at 15:56
  • 1
    Damn! How could I make this mistake? Of course you are right! Sorry for the confusion. – jfpoilpret Oct 3 '14 at 15:58
  • point 5 of roles, using that can i program at89c51 or other mcu? – user4236 Oct 6 '14 at 16:03
  • That would depend on the scheme used by the MCU in question. The at89c51 uses a parallel programming scheme, rather than a serial one. You probably could build a programmer with an arduino, but would have to look into details such as if you would need an I/O multiplexer to drive all the lines, and if you need a transistor to enable a 12v programming supply, or if you have the version of the chip which programs at 5v. – Chris Stratton Oct 6 '14 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy