3.d. Programming AVRs Using AVRDUDE

It is possible to program AVRs in Windows using AVRDUDE. AVRDUDE is free and included in the WinAVR package. To program a hex file on to your AVR, you would type something similar to the following into a command prompt:

cd C:\BlinkLED\default
avrdude -p m168 -P COM2 -c avrispv2 -e -U flash:w:BlinkLED.hex 
  • The argument following the -p is the part number of the AVR. For an Orangutan or 3pi Robot, the part number should be m328p, m1284p, m324p, m644p, m168, or m48.
  • The argument following the -P is the port name. You can determine your programmer’s port name by looking in the “Ports (COM & LPT)” list of your Device Manager for “Pololu USB AVR Programmer Programming Port”.
  • The argument following the -c is the programmer protocol and should be avrispv2.
  • The -e option requests an initial chip erase.
  • The -U option is used for writing, reading, or verifying flash, EEPROM, fuses, or lock bits. In this example we are using -U to write BlinkLED.hex to flash.

Please see the AVRDUDE documentation for more detailed information.