What is it? It makes it easy to calculate the fuse bit settings for AVR microcontrollers.
Click Here to use it!
It’s a copy of engbedded.com’s AVR fuse calculator (here), but written completely by me, and done with a mixture of PHP, Javascript, and C#. I am absolutely aware of how blatant of a rip-off my version is, but my philosophy has always been to write my own tools if I don’t like existing ones.
Why copy it? How is my version different? I HATE how the Engbedded’s version uses server side requests to perform the calculations, this meant that the page refreshes whenever you make a change. The URL for Engbedded’s version is very long when you use it. My version is also aware of possible fuse bit combinations that may have a behaviour that is not listed in the Atmel part descriptor XML.
How did I do it? The C# program I wrote generates the HTML elements for each chip using the XML part description files provided by Atmel. The PHP page takes the GET request from the URL and fetches the correct calculator HTML page, and also adds in a script that sets the saved fuse values upon loading the page if the URL contains saved fuse values. The javascript does bitwise calculations to match presets with fuse settings, and manipulate the page elements.
Some of the chips may not have good descriptor files, thus the page may be useless for that chip, this mainly applies to the new XMEGA chips.
Read more about it on the actual calculator page.
Greetings. Would you be willing to add ATtiny841/441 support to your calculator?
The calculator is automatically generated from a set of XML files from Atmel. But Atmel changed the format of their XML files. I would need to find some time to re-write my generator first.
Any progress on the updates with Atmel definitions?
I find your site much more useful and practical than the other Engbedded site.
One thing that has been an issue are the tiny2313/4313 definitions. The Preset selections are correct. Hoever, the desciption fields for the manual manipulation section for the High Fuses are in the wrong positions.
i use atmega32 and i use avrosp to change fuse i use this simple code
void main ()
{
DDRB |=(1<<3);
OCR0=191;
TCCR0=0x69;
}
to have pwm with 30khz but it seem my microcontroller lock on 1 mhz i even change the fuses low=0xf2,high=0xD9;ext=ff
i see 3khz wave in osciloscope
i really confused i tested many think
Hi,
ATXMEGA128A1 does not have a FUSE3. I do not know the exact configuration. Also avrdude does support that µC.
Hi,
Your site is very useful.
Actually I am using an ATtiny45 for the first time. Without reading the fuses first, I changed lfuse to eliminate the div8 bit. After that, the devise was closed (I had another one…).
Reason: The default setting written in the site for that device is lfuse = 0x6A. Thus the clock source is set to external cristal osc (CKSEL3 not set).
Correct value for the default settings is 0x62.
There is a bug in Atmega1284P Fuse Low Byte. The SUT1 bit is default 1(unprogrammed). The default value of Fuse Low Byte should be 0x62. Please check it in datasheet: http://www.atmel.com/images/doc8059.pdf
I was kind of curious how/where you get that file from atmel with the fuse defaults in it. The question has come up many times on the #avr channel on irc.freenode.net but we have never gotten a good answer.
Frank/Admin here, too lazy to log in
Funny story, the file is from an ancient copy of AVR Studio, not Atmel Studio. It is why it might’ve been hard to find and why it’s hard for me to update it.
Uhh, I think there is some errors there, or I am reading the wrong datasheet.
I am using xmega128A3. search for XMEGA A Manual
in the fuse calculator table for xmega128a3, fuse2 does not match the datasheet. bit 7, 4 and 3 are not used
The table shows fuse3, but fuse3 is reserved and does not exist in xmega128a.
The listed fuse should be fuse4. However, bit 5 is missing which is RSTDISBL
There are other errors too, I guess the XML file is not correct regarding the xmega’s.
But if you find an updated XML this would be a great tool. Atmel has stopped using the ending xml for xml files describing the registers for each device. I think the ending is .atdf . Much like the SVD files describing ARM’s. Maybe this is what you are searching for? I beleive it should be possible to download these as a package directly from atmel.com for all devices.
You shopuld also be able to look them up in studio bit I have totally dropped windows, thus I do not have studio anymore. therefore I do not know where in studio they are
Hello,
(please excuse my bad english, I’m a native speaken old german man).
Actually I’m writing my own fusecalculator for the command line in Linux. By evaluating and parsing the XML-files from Atmel I noticed, that there are bugs in the file (minimum) in ATtiny2313 and ATmega8. The default values in the text discriptors are correct but they don’t corrospondent with the bit default values.
In ATmega8 is by default deactivated (in your calculator it is activated), in ATtiny2313 is the default startup time not correct.
Nice greetings,
Ralph
PS: your calculator generates the same default values as my command line tool
Sorry:
In ATmega8 the watchdog is by default deactivated (in your calculator it is activated)
Please add support for new chip ATmega328PB
For the ATmega16U4 and ATmega32U4 the “Brown-out detection” pull down, for the EXTENDED fuses, shows an incorrect bit pattern for the 3.5V selection.
[BODLEVEL=011]
should be
[BODLEVEL=001]
This is cosmetic in the pulldown text only. The correct 001 bit pattern is actually detected and set.
The same goes for the ATmega8U2, and those shown as (similar) when its selected, for the 4.0V level.
ATMEGA328 -> BOOTSZ1 and BOOTRST checked -> bootSize -> 1024k BUG!
must be 2048k !!!
I don’t know where you’re seeing “1024k” or “2048k” but I agree that there is a small mistake on the ATmega328P part. The reported size of the bootloader is twice what the datasheet says it to be for all values of BOOTSZ (and this is not an issue of words/bytes).
I am so sorry. The data type is WORD, not BYTE. There are no errors in the system.
Thank you very much for this work… but on the ATmega328P, part of LOCKBIT Fuse , LOCKBIT must have 0xc0 instead of 0x00 value , thats what is indicats in AVRDUDE program. because the two hight bits have 1 by default.
Regarding ATMEGA328P
Bit3 should always be programmed= -08H
efuse
BODENLEVEL
4V3=F4H
2V7=F5H
1V8=F6H
DISABLED=F7H
Info AVR studio calculate it right.
The ATTiny 25 default fuses should be LF=0x62 HF=0vDF.
Your default LF programs an external clock source.
Thanks
Hey Frank, please fix the default for the clock source on ATTiny85, clearly should be internal.
Luckily, I had a 4 MHz xtal and couple 20pf caps, so I was able rescue it, but otherwise, I would have been SOL.
Also, I think the Apply button looks like it is not needed.
Thanks !
Hello. Very nice calculator you made! I guess, I found a bug in ATMEGA8.
The low fuse starts with both SUT bits checked (=0) while the manual for both ATMEGA8(L/A – versions I have) states “…The device is shipped with CKSEL = “0001” and SUT = “10” (1MHz Internal RC
Oscillator, slowly rising power)” (page 26).
That statement is again misleading since Table 5 from page 28 of the same manual shows that SUT bits set to 10 (with bit CKSEL0 =1) result in “Crystal Oscillator, fast rising power”….
Hello
I am using Atmega32U4 controller for my embedded device. How can i protect my code fro user to read and write? And what is the procedure of writing the lock bit?
I am using arduino IDE.
Thank you
I think the default for LOW for ATTiny84 is wrong. You have 6A (external xtal) and I think it should be 62 (internal osc.)
For some types (e.g. ATTiny25,45,85, …) the title for CKSEL3 says the default is 1 but it is 0. It is correct in the LOW Fuse Presets popup and the value is (0x62) is correct. It’s just the title.
The lock bits 0/1 should have the label “LB1/2” on these devices.
The default fuse byte values for the ATtiny84 are incorrect. The low byte should be 0x62 and the extended byte should be 0x00 according to the datasheet.
Hi! I think there is a small mistake:
the program says “WTDON”. It needs “WDTON” – “WatchDog Timer On”. Thank you.
“WTDON” – it is written in ATmega8.
In others – I didn’t look.
Thank you.