About writing ATmega 32A Fuse bits

Thread Starter

etech7

Joined Jun 9, 2015
38
Hellow there! I am learning atmel AVR uC. I am confused about the fuse bits. I am using AVRpal.net burner program, USBasp programmer. Here is my questions:

1. My ATmega32A is brand new. Do I need to change the fuse bits? I learned that they are configured default.
2. Can I write fuse bits more than once? I mean, can I change them again if required? (I'm confused with ROM made of fuses. Where they can be programmed once only)
3. If I write the fuse bits once do I need to configure them again before flashing uC with new code?
4. If I apply erase command will it clear the fuse bits altogether? hence requires fuse bits to be programmed again?

-Thanks
 
Last edited:

mtonge

Joined Apr 19, 2016
93
From Lady Ada's tutorial:
You know about flash, eeprom and RAM as parts of the chip. What I did not mention is that there are also 3 bytes of permanent (by permanent I mean that they stick around after power goes out, but that you can change them as many times as you'd like) storage called the fuses. The fuses determine how the chip will act, whether it has a bootloader, what speed and voltage it likes to run at, etc. Note that despite being called 'fuses' they are re-settable and dont have anything to do with protection from overpowering (like the fuses in a home).
The entire tutorial can be found at: http://www.ladyada.net/learn/avr/fuses.html .
 

mtonge

Joined Apr 19, 2016
93
I just read that article and it is helpful but not complete. Just search 'avr fuse bit tutorial', there are many articles out there (and fuse bit calculators too).
 

Papabravo

Joined Feb 24, 2006
21,225
In general the fuse bits return to their default state each time you do a bulk erase on the chip, which is usually the first step in most programmers.
 

DickCappels

Joined Aug 21, 2008
10,179
1. No

2. Yes

3. Usually no.
The programmers I have used flash the code separately from the fuse bits except when using an elf file to control the programming.

4.See Papabravo's explanation
 

Thread Starter

etech7

Joined Jun 9, 2015
38
From Lady Ada's tutorial:
You know about flash, eeprom and RAM as parts of the chip. What I did not mention is that there are also 3 bytes of permanent (by permanent I mean that they stick around after power goes out, but that you can change them as many times as you'd like) storage called the fuses. The fuses determine how the chip will act, whether it has a bootloader, what speed and voltage it likes to run at, etc. Note that despite being called 'fuses' they are re-settable and dont have anything to do with protection from overpowering (like the fuses in a home).
The entire tutorial can be found at: http://www.ladyada.net/learn/avr/fuses.html .
I read the article. Obviously useful but still confused. To get rid of these confusion I visited several website but still no solution.
 

Thread Starter

etech7

Joined Jun 9, 2015
38
In general the fuse bits return to their default state each time you do a bulk erase on the chip, which is usually the first step in most programmers.
So, there is no way to accidentally alter the fuse bits in wrong way, if I apply erase command or unless if I try to alter them consciously.
 

Thread Starter

etech7

Joined Jun 9, 2015
38
1. No

2. Yes

3. Usually no.
The programmers I have used flash the code separately from the fuse bits except when using an elf file to control the programming.

4.See Papabravo's explanation
Thanks! I looked well the AVRpal.net interface. There is separate option to read/write the fuse bits. I expect that erase command will only clear the flash space.
 

DickCappels

Joined Aug 21, 2008
10,179
Atmel programmers have an "Erase Device" commant that erases the flash, EEPROM, and sets the fuses to (apparently) factory default. This is a wonderful improvement that means that if you lock the chip to prevent further reads/writes the Erase Devices command makes it possible to reprogram the device without having to resort to high voltage programming.
 
Top