AVR Fuse Programming

Fuse Bytes are special areas in the flash (one or two bytes, usually) that control special features of the chip, such as clock sources, boot reset vector, JTAG hardware, etc. For a beginner, there is no need to ever touch the fuses - except in two scenarios:

1. The default factory setting on 1 MHz is not fast enough - you want to use the internal 8MHz oscillator or an external crystal.

OR

2. You want to disable JTAG on devices like the ATMEGA32 to get the additional IO pins.

In such a case, read the datasheet to find out what the new fuse values should be. Use verbose output of AVRDUDE to see what the fuses are initially.

(Hint: for ATmega32, no JTAG, internal 8MHz RC oscillator and all other defaults, the fuses are high = 0xD9 and low = 0xE4)

So now to actually write your fuse bytes into the chip:

avrdude -c dapa -p m32 -U hfuse:w:0xD9:m -U lfuse:w:0xE4:m

Note that the values in hex have replaced the filenames; and the trailing 'm' tells it to use it as an immediate value.