AVR Fuse Settings – Timing is Everything

When your AVR projects just aren’t working as planned, it may be an issue of timing.

On more than one occasion, I began a project with a new ATMEGA328 MCU and either couldn’t communicate with it via serial or things were going very S-L-O-W-L-Y.  Usually this entailed double and triple-checking the breadboard power and jumper wire connections before I “re-remember” that I need to check the fuse settings on my MCU.

Setting the fuses on the ATMEGA328 can be confusing if you aren’t absolutely sure what you are doing.  I have “bricked” more than one with improper fuse settings.

Setting the fuses for an Arduino

If your avrdude output looks something like the following, you may have your fuses set incorrectly:


avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as 62
avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as 7

avrdude_fuse_setting_before

I usually set mine like the following:

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DA
avrdude: safemode: efuse reads as 5

The following command works for the Atmega328P with an external 16MHZ crystal oscillator (Like an Arduino).
avrdude -P usb -c avrispmkII -b 19200 -p m328p -v -e -U lfuse:w:0xff:m -U hfuse:w:0xda:m -U efuse:w:0x05:m

Setting the fuses for the ATTINY84

The following command works for an ATTINY84 with NO Crystal oscillator
avrdude -P usb -c avrispmkII -b 19200 -p t84 -v -e -U lfuse:w:0x62:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m

Other MCU’s

If you have a different setup or microcontroller, you can use this excellent calculator to get the right settings.

Leave a Reply

Your email address will not be published. Required fields are marked *