Homepage of Lars E. Pettersson

AVR Programming

On this page I will put some information about AVR programming while I learn how to program AVR micro-controllers myself. It will probably mostly work as a note-book for my own use, but the information might be of use to others, therefore this page.

AVR Dragon

AVR Dragon is low cost development board from Atmel, see http://www.atmel.com/tools/avrdragon.aspx for more information.


To be able to use avrdragon as a regular user you need to create a file in /etc/udev/rules.d/. I named it 90-avrdragon.rules. In this file you should add the following (tested on Fedora 22), all in one line:

SUBSYSTEM=="usb", ATTR{idVendor}=="03eb", ATTR{idProduct}=="2107", GROUP="users", MODE="0666"

This will set the mode of the AVR Dragon USB port to read+write for user, group, and all.

Run the following command as root to reload the udev configurations:

udevadm control -R

Getting started

Misc information


Use Fuse calculator to get the correct values for avrdude. To see the current setting do the following:

avrdude -p m1284p -c dragon_jtag -P usb -v


Setting fuses (get the numbers for the different fuses from above):

avrdude -p m1284p -c dragon_jtag -P usb -U lfuse:w:0x42:m -U hfuse:w:0x99:m -U efuse:w:0xff:m

To program the file flash.hex to the micro controller, do:

avrdude -p m1284p -c dragon_jtag -P usb -e -U flash:w:flash.hex
Author: Lars E. Pettersson - Created 2015-06-10 Wed 11:16 - Using: Emacs 24.5.1 (Org mode 8.3beta).