Electronics – Tuts, tips and much more …

If we hear, we forget; if we see, we remember; if we do, we understand – Confucius

AVR fuse bits settings

Posted by Omkar on April 3, 2010

Setting AVR fuse bits correctly is most important and equally confusing part for many beginners. In this post I have presented some of the ready to use fuse bit settings and corresponding batch files, which can be used with AVRdude.

Link for downloading avrdude batch files (to be used with USBasp) is given at the end of this post.


Microcontroller

H
fuse

L
fuse

Description

ATmega16/32 0x99 0xE1 Factory Default Settings for ATmega16/32.

H fuse:
JTAG            : Enabled
OCD             : Disabled
SPI Programming : Enabled
CKOPT           : Unprogrammed
EEPROM Preserve : Unprogrammed (EEPROM not preserved)
BOOT size       : 1024 words
Reset Vector    : User flash code

L fuse:
Brown-out level : 2.7V
Brown-out detect: Disabled
Startup timing  : Default
Clock Source    : Internal, 1MHz

ATmega16/32 0xD9 0xFF External Crystal upto 16MHz, JTAG disabled. Rest of the options : Default.
ATmega16/32 0xD9 0xE4 Internal 8MHz oscillator, JTAG disabled. Rest of the options : Default.
ATmega8 0xD9 0xE1 Factory Default Settings for ATmega8.

H fuse:
Reset Disabled  : Unprogrammed (Reset pin is enabled)
Watchdog        : Off
SPI Programming : Enabled
CKOPT           : Unprogrammed
EEPROM Preserve : Unprogrammed (EEPROM not preserved)
BOOT size       : 1024 words
Reset Vector    : User flash code

L fuse:
Brown-out level : 2.7V
Brown-out detect: Disabled
Startup timing  : Default
Clock Source    : Internal, 1MHz

ATmega8 0xD9 0xEF External Crystal upto 16MHz. Rest of the options : Default.
ATtiny13 0xFF 0x6A Factory Default Settings for ATtiny13.

H fuse:
Self programming: Disabled
debugWire       : Disabled
Brown-out detect: Disabled
Reset Disabled  : Unprogrammed (Reset pin is enabled)

L fuse:
SPI Programming : Enabled
EEPROM Preserve : Unprogrammed (EEPROM not preserved)
Watchdog        : Off
Clock div by 8  : Enabled
Startup timing  : Default
Clock Source    : Internal, 9.6MHz

ATtiny13 0xFF 0x69 Internal 4.8MHz oscillator, Divide clock by 8. Rest of the options : Default
ATtiny13 0xFF 0x79 Internal 9.6MHz oscillator, clock is not divided by 8. Rest of the options : Default.

 

Fuse programming is most crucial and any mistake might lead to non-functioning AVR controller. I have also made DOS batch files, which can be used to apply above mentioned settings with AVRdude and USBasp. You can download these files from :

AVR Dude – DOS batch files for fuse bit settings using USBasp. Archive password : mega16

http://www.megaupload.com/?d=S9BCR2RJ

About these ads

9 Responses to “AVR fuse bits settings”

  1. Ramya said

    does changing fuse bits causes any problem?? and is it irreversible??
    i have given my high fuse bit =c9
    low fuse bit =ff..
    and im getting rc=-1 error even after changing fuse bits to its default value its not working..

  2. Ramya said

    i have given my high fuse bit =c9
    low fuse bit =ff..
    and im getting rc=-1 error even after changing fuse bits to its default value its not working..

  3. Thanks man…..I was about to blow my head against wall….saved it

  4. [...] you’ve messed up your fuses. Right? Thanks to this page  http://elecrom.wordpress.com/2010/04/03/avr-fuse-bits-settings/ I got a decent resource to share with you people. It was frustrating to find out that I always need [...]

  5. vicky raj said

    to connect an external crystal oscillator of 16 Mhz to atmega 16 ,the only thing which i require to adjust is fusebit settings in the extreme burner software while programming atmega 16 or something more…….?

    • Omkar said

      Nothing else is required. But make sure that, you do the fuse-bit settings correctly. You have to do that first and then burn the code.

  6. Pranav Sharma said

    Thanks a lot man :D This is just what I was looking for….. :)
    I noticed my usbasp just wouldnt read the atmega16 clocked by the internal 1MHz clock… Setting the isp clock delay to 3 solved the problem :)
    avrdude -c usbasp -p m16 -i 3

    Thanks

  7. Manu said

    ur notes regarding Fuse settings is really helpful..thanky you so much..also can u tell me how to recover chips that gone wrong due to wrong fuse bit settings.

  8. Nirmal said

    Hi,
    All of a sudden,I cannot program my AtMEGA32.avrdude:stk500_getsync():not in syn:resp=0x00
    avrdude:stk500_disable():protocol error,expect=0x14,resp=0x51

    Could you please help me what’s gone wrong.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 92 other followers

%d bloggers like this: