Stand-alone fuse calculator for your chips

After reading various posts from people saying "but what are my fuses set at?" ... I thought it would be handy to be able to find out, preferably without having to hook the board up to a programmer.

The sketch I developed is similar to the one which detects what sort of chip you have by entering ICSP programming mode and querying the chip. The wiring is identical, and is described here:

http://www.gammon.com.au/forum/?id=11633

Basically you connect up the board with the sketch, to the target board, with 6 wires, along these lines:

Then the sketch finds the fuse settings and attempts to render them in a readable way:

Atmega fuse calculator.
Entered programming mode OK.
Signature = 0x1E 0x95 0x0F 
Processor = ATmega328P
Flash memory size = 32768
LFuse = 0xFF 
HFuse = 0xDE 
EFuse = 0xFD 
Lock byte = 0xCF 
External Reset Disable.................. [ ]
Debug Wire Enable....................... [ ]
Enable Serial (ICSP) Programming........ [X]
Watchdog Timer Always On................ [ ]
Preserve EEPROM through chip erase...... [ ]
Boot into bootloader.................... [X]
Divide clock by 8....................... [ ]
Clock output............................ [ ]
Bootloader size: 512 bytes.
Start-up time: SUT0: [X]  SUT1: [X] (see datasheet)
Clock source: low-power crystal.
Brownout detection at: 2.7V.

Or for the ATmega16U2 on the Uno Rev 3:

Atmega fuse calculator.
Entered programming mode OK.
Signature = 0x1E 0x94 0x89 
Processor = ATmega16U2
Flash memory size = 16384
LFuse = 0xEF 
HFuse = 0xD9 
EFuse = 0xF4 
Lock byte = 0xCF 
Hardare Boot Enable..................... [X]
Debug Wire Enable....................... [ ]
External Reset Disable.................. [ ]
Enable Serial (ICSP) Programming........ [X]
Watchdog Timer Always On................ [ ]
Preserve EEPROM through chip erase...... [ ]
Boot into bootloader.................... [ ]
Divide clock by 8....................... [ ]
Clock output............................ [ ]
Bootloader size: 4096 bytes.
Start-up time: SUT0: [X]  SUT1: [X] (see datasheet)
Clock source: low-power crystal.
Brownout detection at: 3.0V.

And the Mega board:

Atmega fuse calculator.
Entered programming mode OK.
Signature = 0x1E 0x98 0x01 
Processor = ATmega2560
Flash memory size = 262144
LFuse = 0xFF 
HFuse = 0xD8 
EFuse = 0xFD 
Lock byte = 0xCF 
OCD Enable.............................. [ ]
JTAG Enable............................. [ ]
Enable Serial (ICSP) Programming........ [X]
Watchdog Timer Always On................ [ ]
Preserve EEPROM through chip erase...... [ ]
Boot into bootloader.................... [X]
Divide clock by 8....................... [ ]
Clock output............................ [ ]
Bootloader size: 8192 bytes.
Start-up time: SUT0: [X]  SUT1: [X] (see datasheet)
Clock source: low-power crystal.
Brownout detection at: 2.7V.

Code here:

http://gammon.com.au/Arduino/Atmega_Fuse_Calculator.zip

Use at your own risk. It is incredibly tedious keying in the fuse meanings, so if you find any errors please let me know.

It is incredibly tedious keying in the fuse meanings

A few days ago I crossed paths with an Atmel document that very nicely organized all the fuse bits. Let me know if you're interested and I'll try to hunt it down.

That would be great, thanks!

Don't thank me yet (well, you can thank for the effort). I may not be able to resurrect enough of the memory. What really pisses me off is I can distinctly remember what the grid looks like just not how I found the document or what else was in the document. Stupid brain. Why must you mock me!

That happens to me all the time. Which is why I take on short-term projects. :frowning:

That's awesome. Great idea, Nick. 8)

I found it! Unfortunately, it's woefully out of date (pages 23 - 27)... http://www.atmel.com/Images/doc2525.pdf

Better than nothing, thanks!