AVR Programmers

From RepRapWiki
Jump to: navigation, search

Most AVR microcontrollers (e.g. ATmega 644, 644P, 1284P) used for the RepRap project are programmed with new or updated firmware via USB, often using the Arduino environment. For this to function, however, the microcontroller must have been previously programmed with a bootloader, a special piece of software that runs for a short time on startup and monitors the USB connection to observe whether a firmware upload is in progress, before handing control over to the firmware.

If a new, blank AVR chip is obtained (the most common scenario), or a new bootloader is required (rare), then the chip cannot be programmed in this manner, since it does not contain the software to do so. In this case, a separate hardware programmer is required, for which there are several options. One of the most common choices is to use a second Arduino board as an in-system programmer, programming the chip in-place on the RepRap electronics board. That, and several other choices, are outlined in the table below, together with links to descriptions of how to go about them.

Compatibility

This is a compatibility chart for various AVR programmers to aid people in finding a suitable programmer for their RepRap electronics project. Each programmer is followed by a column that indicates whether or not it is possible to program from within the Arduino software or whether some other programming software is required. The rest of the columns indicate compatibility of the programmer with the various chips used in RepRap electronics. It boils down to whether a programmer is capable of programming chips with only 64 kB of flash (16 bit address width, e.g. ATmega644, 644P) or also bigger ones (24 bit address width, e.g. ATmega1284P). A question mark indicates probable compatibility but not yet confirmed. If you can confirm any of the unknown entries, please remove the "?".

Programmer Arduino software support Flash <= 64 kB Flash > 64 kB
USBTiny Y Y N
Pololu USB AVR Programmer  ? Y Y
AVR ISP MK II Y Y Y
USBasp Y Y Y
Arduino as an ISP Y Y Y?
Computer with a parallel port Y Y Y?

Note: if you happen to have a programmer for < 64 kB already, you can still program bigger chips with it, but only firmwares up to 64 kB in size and no bootloader.