Difference between revisions of "Serial ICSP programing"

From Organic Design wiki
m (Caretaker: categories)
(avrdude examples)
Line 30: Line 30:
 
=See also=
 
=See also=
 
*[http://www.nongnu.org/avrdude/ avrdude]
 
*[http://www.nongnu.org/avrdude/ avrdude]
 +
*[http://wolfpaulus.com/journal/embedded/arduino2.html ICSP programming] using a separate USB driven serial programmer. This article has some useful ''avrdude'' commands for burning fuses to unlock pages for writing.

Revision as of 23:24, 28 April 2007

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

  • avrdude
  • ICSP programming using a separate USB driven serial programmer. This article has some useful avrdude commands for burning fuses to unlock pages for writing.