October 29, 2019

The ATtiny13 "fuses"

These are discussed in section 17.2 of the datasheet.

These are all quite important. The so called "fuses" are a pair of 8 bit non-volatile configuration registers. They can be programmed by avrdude using their own particular protocol. It is quite possible to "brick" your attiny13a by setting unfortunate fuse values. This apparently can be recovered using something called "high voltage" programming (the high voltage is simply 12 volts applied in a certain way). However this is inconvenient as most folks don't have a high voltage programmer handy.

There are also a pair of "lock bit" that are much like fuse bits, but if cleared make it impossible to read (or even modify) fuse bits, eeprom, and flash. These can be restored to "1" values by a device clear command.

There are two sets of fuses, called "high" and "low".

High fuses

By default these are all "1" (not activated).

The Lpodkalicki blink example sets these to 0xff (none of these special features are enabled).

0x80 - unused
0x40 - unused
0x20 - unused
0x10 - self programming enabled
0x08 - debugwire enabled
0x04 - brownout threshold
0x02 - brownout threshold
0x01 - external reset disabled

Low fuses

The default setting is 0x6A (as shown).

The Lpodkalicki blink example sets these to 0x6A = 0110 1010. These are the default settings.

0x80 - 0 - serial programming enabled.
0x40 - 1 - preserve EEPROM through chip erase
0x20 - 1 - WD timer always enabled
0x10 - 0 - divide clock by 8
0x08 - 1 - select startup time
0x04 - 0 - select startup time
0x02 - 1 - select clock source
0x01 - 0 - select clock source
The value of "10" for select startup time gives maximum startup time.
The value of "10" for select clock source selects the internal 9.6 Mhz RC oscillator.

The Biscotti flashlight software sets 0x7A for the low fuse value. This does not divide the oscillator by 8, so we get a full speed 9.6 Mhz clock. This is also the case for the Toykeeper "STAR" hello world application.

There are 4 possible clock sources, as follows:

00 - external clock
01 - 9.6 Mhz internal RC
10 - 4.8 Mhz internal RC
11 - internal 128 kHz oscillator (low power)
Section 6 of the datasheet has lots of information about the clock


Have any comments? Questions? Drop me a line!

Tom's Electronics pages / [email protected]