We have a small selection of AVR programmers lying around. This is an attempt to document how to use them.
10-pin ISP header pinout
|4||TX or GND|
|6||RX or GND|
6-pin ISP header pinoout
Note that some boards have a non-standard pinout for the 6-pin headers.
RS-232 programmer (ATtiny2313)
This programmer has a DB-9 serial port in one end and a 10-pin ISP header in the other end.
Programmer type: avr910
NB! This programmer uses non-standard device codes for atmega48/88/168 (0x06, 0x07 and 0x08).
To make it work, edit avrdude.conf:
part id = "m168"; avr910_devcode = 0x08;
Note: This programmer requires the target to be self-powered.
avrdude command lines
avrdude -P <serialport> -c avr910 -b 115200 -p atmega168
USBasp programmer (stripboard)
This is a USB programmer built on a stripboard. It has a USB-B connector in one end an a 10-pin ISP header in the other end.
Programmer type: usbasp
avrdude command lines
avrdude -c usbasp -p atmega168
Example: Program Arduino NG bootloader:
avrdude -c usbasp -p atmega168 -e -u -U lock:w:0x3f:m -U efuse:w:0x00:m -U hfuse:w:0xdf:m -U lfuse:w:0xff:m avrdude -c usbasp -p atmega168 -U flash:w:ATmegaBOOT_168_ng.hex:i -U lock:w:0x0f:m
A Metaboard-based programmer.
This programmer behaves exactly like the USBasp stripboard programmer.
In the current incarnation, this programmer is not as stable as the USBasp version. We need to figure this out, e.g. ask Christian for advice. Symptoms are aborted operation during read or write. Usually it helps to try again and to run verify as a separate step.
avrdude: error: wrong reading bytes b8
Note: This programmer has a bootloader on it, so it can be updated over USB. There is a jumper to enable the bootloader. This jumper must be off when using it as a programmer and on when accessing the bootloader.
The USBTinyISP from Lady Ada. FIXME: Safe vs. unsafe
avrdude -c usbtiny -p atmega168
Sometimes, the following happens:
avrdude: erasing chip
avrdude: error: programm enable: target doesn't answer. 1
This has shown to be caused by wrong crystal fuse settings, typically an issue when programming fresh chips. To fix, program all fuses first, before erasing the chip.