Serial ICSP programing

From Organic Design wiki
Revision as of 23:36, 28 April 2007 by Rob (talk | contribs) (suitable circuit)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ICSP stands for In Circuit Serial Programming and is a method of flashing a Microcontroller with a serial data stream. ICSP is supported by both AVR and PIC type micros. This article describes how to construct a simple cable that will connect the ICSP header on the Arduino AVR board to the serial port of a PC.

Software

avrdude is a small program for programming AVR micro-controllers. It is open source and supports a wide range of hardware and including a number of home-brew programmers. A number of device types are supported. These are listed in the avrdude.conf file.

The type of programmer I will detail is a par type device.

Hardware

The Arduino exposes the ICSP lines through a 6 pin header on the board. Here is the pin out.

  • 1 MISO
  • 2 +5V
  • 3 SCK
  • 4 MOSI
  • 5 RESET
  • 6 GND

avrdude lets you set the pin outs from the serial port in the configuration file. I will modify an existing configuration for the purpose.

programmer
  id     = "robflash";
  desc   = "Rob's home-brew AVR flash cable";
  type   = par;
  reset  = 2;
  sck    = 3;
  mosi   = 4;
  miso   = 13;
;

See also