{"id":560,"date":"2022-05-08T13:23:16","date_gmt":"2022-05-08T12:23:16","guid":{"rendered":"https:\/\/ceptimus.co.uk\/?p=560"},"modified":"2022-05-08T13:33:38","modified_gmt":"2022-05-08T12:33:38","slug":"reading-arduino-fuses-using-usbasp-from-linux","status":"publish","type":"post","link":"https:\/\/ceptimus.co.uk\/index.php\/2022\/05\/08\/reading-arduino-fuses-using-usbasp-from-linux\/","title":{"rendered":"Reading Arduino fuses using USBasp from Linux"},"content":{"rendered":"\n<p>Change to the directory where avrdude is located.  If you don&#8217;t know, you can search for it with: sudo find \/ -name avrdude<\/p>\n\n\n\n<p>(find can take a long time to search the whole filesystem. You can interrupt it with Ctrl-c).<\/p>\n\n\n\n<p>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:<\/p>\n\n\n\n<p>cd ~\/arduino-1.8.19\/hardware\/tools\/avr\/bin<\/p>\n\n\n\n<p>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 &#8216;avr&#8217; path was at:<\/p>\n\n\n\n<p> ~\/arduino-1.8.19\/hardware\/tools\/avr\/etc\/avrdude.conf<\/p>\n\n\n\n<p>(in Linux, you can always use the tilde character,  ~ as the shortcut for your \/home\/username folder).  Given that we&#8217;ve already changed directory to the avr\/bin folder, we can put in a shorter relative path to the conf file:<\/p>\n\n\n\n<p>..\/etc\/avrdude.conf<\/p>\n\n\n\n<p> Then connect the USBasp and enter the avrdude command:<\/p>\n\n\n\n<p>.\/avrdude -c usbasp -p t85  -C ..\/etc\/avrdude.conf<\/p>\n\n\n\n<p>For this example I was reading the fuses of an ATtiny85, but if you&#8217;re using a &#8216;normal&#8217; Arduino Uno or Nano, you change t85 to m328p<\/p>\n\n\n\n<p>Explanation of command.<\/p>\n\n\n\n<p>-c sets the programmer type, in this case usbasp<\/p>\n\n\n\n<p>-p specifies the &#8216;part number&#8217;: the name of the target device.<\/p>\n\n\n\n<p>-C specifies the location of the avrdude.conf configuration file.<\/p>\n\n\n\n<p>You should see about five lines of output, one of which displays the fuse settings:<\/p>\n\n\n\n<p>avrdude: safemode: Fuses OK (E:FF, H:DF, L:F1)<\/p>\n\n\n\n<p>E is short for &#8216;Extended&#8217;, H for &#8216;High&#8217; and &#8216;L&#8217; 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 &#8216;verbose output&#8217;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Change to the directory where avrdude is located. If you don&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-560","post","type-post","status-publish","format-standard","hentry","category-arduino","category-programming"],"_links":{"self":[{"href":"https:\/\/ceptimus.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/560","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ceptimus.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ceptimus.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ceptimus.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ceptimus.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=560"}],"version-history":[{"count":4,"href":"https:\/\/ceptimus.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/560\/revisions"}],"predecessor-version":[{"id":565,"href":"https:\/\/ceptimus.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/560\/revisions\/565"}],"wp:attachment":[{"href":"https:\/\/ceptimus.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ceptimus.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ceptimus.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}