Tool: FuseCalc

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.

10 thoughts on “Tool: FuseCalc

    1. Admin Post author

      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.

      Reply
  1. hiduino

    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.

    Reply
  2. reza

    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

    Reply
  3. Ruedi Heimlicher

    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.

    Reply
  4. Ray Moore

    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.

    Reply
    1. Frank Zhao

      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.

      Reply
  5. Vidar Vidnes

    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

    Reply

Leave a Reply

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