Reading Arduino fuses using USBasp from Linux

Change to the directory where avrdude is located. If you don’t know, you can search for it with: sudo find / -name avrdude

(find can take a long time to search the whole filesystem. You can interrupt it with Ctrl-c).

For example, on my system (Linux Mint, May 2022) it was in a subdirectory of the arduino-1.8.19 of my home directory, change directory to the one containing avrdude:

cd ~/arduino-1.8.19/hardware/tools/avr/bin

Find where avrdude.conf is stored on your system: sudo find / -name avrdude.conf On my system, there were multiple files, but the one in the ‘avr’ path was at:

~/arduino-1.8.19/hardware/tools/avr/etc/avrdude.conf

(in Linux, you can always use the tilde character, ~ as the shortcut for your /home/username folder). Given that we’ve already changed directory to the avr/bin folder, we can put in a shorter relative path to the conf file:

../etc/avrdude.conf

Then connect the USBasp and enter the avrdude command:

./avrdude -c usbasp -p t85 -C ../etc/avrdude.conf

For this example I was reading the fuses of an ATtiny85, but if you’re using a ‘normal’ Arduino Uno or Nano, you change t85 to m328p

Explanation of command.

-c sets the programmer type, in this case usbasp

-p specifies the ‘part number’: the name of the target device.

-C specifies the location of the avrdude.conf configuration file.

You should see about five lines of output, one of which displays the fuse settings:

avrdude: safemode: Fuses OK (E:FF, H:DF, L:F1)

E is short for ‘Extended’, H for ‘High’ and ‘L’ for low. If you want to see more detail you can add -v as an option to the command (at the end, separated by a space) to give ‘verbose output’.


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *