AVRdude is bundled with WinAVR compiler and is a command line program for burning hex code into AVR ICs.

Before starting the Avrdude , connect the Usbasp programmer to your PC.

Press WIN+R  to open up the Run dialog box.Type cmd.exe to open the Terminal window.Navigate to the folder where we created our .Hex & other files.In our case it is C:\LED_TEST.

dude1

Type C:\LED_TEST>avrdude

to view the list of options used with avrdude.

-c : Indicates the programmer type (use usbasp as argument)

-p : Processor. (We are using ATmega16, hence type m16 as argument ).

-U  :  memtype:op:filename[:format]

-U is the command to fuse .hex file on to AVR’s memory. Multiple ‘-U’ options can be specified in order to operate on multiple memories on the same command-line .

Here is the command we use to program our blinkled.hex file.

Take care of casing of letters (small or capital letter), as the command is case sensitive.

C:\LED_TEST> avrdude –c usbasp –p m16 –u –U flash:w:blinkled.hex

Watch this video :

AVRDUDE