[chbot] ATMEL ICSP in-circuit programming , prop plug programming redux
Charles Manning
manningc2 at actrix.gen.nz
Thu Jul 9 00:05:28 BST 2009
There are two ways to program the AVR (discounting the debug interfaces for
now):
* UART style as is done with Arduino. This needs a "bootloader" preprogrammed
onto the AVR. This is just RS232-like and will work with an unmodified
prop-plug so long as you get the pin outs right. It will also work with a
regular RS232 serial port translation chip like a MAX232.
* ISP mode. This works with a raw micro and does not need a boot loader.
However this needs an extra control pin...
UART style (Arduino) programming only need ground, RX, TX and a reset. ie 3
signal pins
ISP mode requires ground, reset, MOSI, MISO, Clock. ie 4 signal pins.
ISP mode programming is easily achieved with the avrdude software which
supports numerous different hardware configuration including:
* parallel port:
* serial port:
* ftdi chip: (could probably modify a prop plug to do this).
* USBTinyISP etc.
and Google will find you more.
I have used parallel programmers in the past and found them sometimes
unreliable.
I used simplified version of the ponyser
(http://core.st/projects/Serial_programmer/index.html) for a bit. That's fast
enough on directly wired serial port but is far too slow for proper use on a
USB to serial adapter.
I now use a USBTinyISP V2 (we now have two in the family). This is a USB
programmer that runs the USB protocol on an AVR chip and is very fast. I
bought the kit from http://www.ladyada.net/make/usbtinyisp/ for around $US30
including shipping but it is easy enough to make your own for around $20NZ.
All the schematics and firmware is published and free to use.
There are two versions of the USBTinyISP:
* Version 1: http://www.ladyada.net/images/usbtinyisp/usbtinyisp.png Handles a
reduced voltage range, but simpler. You don't need all those connectors at
the top of the schematic.
* Version2: http://www.ladyada.net/images/usbtinyisp/usbtinyisp2sch.png has an
extra buffer chip to handle a wider voltage range.
Hope that helps...
Charles
More information about the Chchrobotics
mailing list