Difference between revisions of "Serial ICSP programing"

From Organic Design wiki
 
m
Line 32: Line 32:
 
=See also=
 
=See also=
 
*[http://www.nongnu.org/avrdude/ avrdude]
 
*[http://www.nongnu.org/avrdude/ avrdude]
 +
[[Category:Media Center]][[Category:Hardware]]

Revision as of 00:27, 26 March 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;
;

Question: Do you need capacitors/resistors in between the lines of the serial port and the lines of the micro? Perhaps it's safer to have some kind of buffer?


See also