[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  Electronics
. -> [Folder]  Microprocessors
. . -> [Subject]  Atmega Fuse Calculator sketch
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Atmega Fuse Calculator sketch

Postings by administrators only.

[Refresh] Refresh page


Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Tue 22 May 2012 05:25 AM (UTC)

Amended on Mon 06 Oct 2014 08:25 PM (UTC) by Nick Gammon

Message
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.


Source on GitHub

The latest version will be available on GitHub:

https://github.com/nickgammon/arduino_sketches

You can see from that what recent changes were.

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

Related sketches:




Web-based fuse calculator

A different way of evaluating fuses is presented at this web page:

http://www.engbedded.com/fusecalc

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


14,075 views.

Postings by administrators only.

[Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]