AVR by Atmel comes with very rich set of peripherals, user can use some of those peripherals according to their specific needs. Each peripheral has some associated registers, you modify those registers to use a peripheral according to your requirement. Apart from the settings done by peripheral specific registers, there are some Global Settings which affects all the peripherals and behavior of mcu as whole. These kind of settings includes System Clock settings, Power on Reset settings, Boot Sector size in Flash, kind of clock source and programming options. Fuse bits are meant to set some of these global attributes. It is important to understand the purpose and common settings of Fuse bits.
As the name suggests, “Fuse” bits settings are non volatile, that means you do not have to specify these settings in your firmware, you can program the Fuse bits separately before loading any application firmware on the MCU flash. Once you set the Fuse Bits, they are latched and can't be changed by application firmware at run time.
Let us take example of the most basic MegaAVR device, say ATmega8, It has total of 16 fuse bits in the form of two separate 8 bit registers or 2 bytes. These two registers are known as Low Fuse Byte (LFuse, 0-7) and High Fuse Byte (HFuse, 8-15).
above statement simply means that if you write a fuse bit as '0' it will be treated as programmed or SET. For example, if you wish to enable ISP programming over SPI interface you have to enable SPIEN fuse bit. To enable SPIEN you write this bit as '0' and not '1'.
| Fuse High Byte | Bit number | Description | Default Value |
|---|---|---|---|
| RSTDISBL | 7 | Select if PC6 is a Reset pin or an IO pin | 1 (Unprogrammed, PC6 is a reset pin) |
| WDTON | 6 | Watch Dog Timer always ON | 1 (Unprogrammed, WDT enabled by WDTCR) |
| SPIEN | 5 | Enable Serial Program and Data Downloading over SPI | 0 (Programmed, SPI Programming Enabled) |
| CKOPT | 4 | Oscillator Options, | 1 (unprogrammed) |