AVRDUDE Attiny84 Fuses

From media_wiki
Jump to: navigation, search

AVRDUDE Attiny84 Fuses
The ATtiny84 uses three fuse bytes that configure clock rate and special features on-board the chip.
The fuses are known as "Fuse Low Byte", "Fuse High Byte", and "Fuse Extended Byte".
"Fuse Low Byte" configures the processor's clock source, start-up timing, clock output, and internal divide by 8 function.

Reference Page for fuse calculator: http://www.engbedded.com/fusecalc/

Open CMD Find the AVRDude program
For version 5.11
C:\Users\Mirco
cd \
cd WinAVR-20100110\bin (version 5.11)

For Version 6.3.0
C:\Users\Mirco
cd Documents\AVRDude-V6-3

avrdude -p t84 -c usbtiny -v "-p= processor type -c = programmer type -v = Verbose
avrdude -p t84 -c AVRISP -v -P usb

Setting Low Byte Fuse examples: (configures processor clock)
avrdude -p t84 -c usbtiny -v -U lfuse:w:0x22:m "Enable External clock on PB2 Enable Divide by 8 Clock (1MHz)"
avrdude -p t84 -c usbtiny -v -U lfuse:w:0xA2:m "Enable External Clock on PB2 Disable Divide by 8 Clock (8MHz)"
avrdude -p t84 -c usbtiny -v -U lfuse:w:0x62:m "Disables External Clock on PB2 Enable Divide by 8 Clock (1MHz)" Default
avrdude -p t84 -c usbtiny -v -U lfuse:w:0xE2:m "Disables External Clock on PB2 Disables Divide by 8 Clock (8MHz)"
avrdude -p t84 -c usbtiny -v -U lfuse:w:0xff:m "Enable External clock on PB2 Enable (16MHz)"

Write to all fuses: Example 1MHz (Default Setting)
avrdude -p t84 -c usbtiny -v -U lfuse:w:0x62:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
Write to all fuses: Example 8MHz
avrdude -p t84 -c usbtiny -v -U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
Write to all fuses: Example 16MHz
avrdude -p t84 -c usbtiny -v -U lfuse:w:0xff:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m

Writing a file to the Microcontrller.
avrdude -p t84 -c usbtiny -e -U flash:w:diag.hex

Using an USBASP Programmer
avrdude -p t84 -c usbasp -v

Additional Resources:
https://savannah.nongnu.org/projects/avrdude/
https://www.nongnu.org/avrdude/user-manual/avrdude.html
https://www.nongnu.org/avrdude/user-manual/avrdude_4.html#Option-Descriptions "Option Descriptions is a great resource!"
AVRDUDE Resources:
https://learn.sparkfun.com/tutorials/pocket-avr-programmer-hookup-guide/using-avrdude
http://www.ladyada.net/learn/avr/avrdude.html
https://www.cs.ou.edu/~fagg/classes/general/atmel/avrdude.pdf
http://www.lydiard.plus.com/chapter7.htm


ATtiny84 Class