USBASP & AVRDUDE: Reading fuse bits

Recently the USBASP programmer has become a hot favorite to program AVR chips. It is small, inexpensive and works great with avrdude.

I was recently working with an RC brushless speed controller (ESC) and wanted to read the fuse values of the on-board Atmega8L chip. After running through some iterations i got it working. Here it is

avrdude.exe -c usbasp -p m8 -U lfuse:r:low_fuse_val.hex:h -U hfuse:r:high_fuse_val.hex:h

-c usbasp : Is the USBASP programmer. You do not need to mention the port to be USB. Seems like avrdude picks the programmer up without that info

-p m8 : The atmel device. In my case it was an Atmega8.

-U lfuse:r:low_fuse_val.hex:h

Here, ‘lfuse’ is a keyword that lower fuse byte is being accessed. Other keywords are ‘efuse’, ‘hfuse’, ‘flash’

‘r’ indicates that a read is being performed.

low_fuse_val.hex is just a name of a file into which the lower fuse byte will be written

‘h’ indicates that value will be in raw hex format. ‘i’ gives you the intel-hex format.

Advertisements
About

I am a computer engineer living in the beautiful city of Austin,TX. While my day job is designing computer chips, I love to dabble in woodworking, metalworking, r/c and electronics.

Tagged with: , ,
Posted in Electronics, r/c
One comment on “USBASP & AVRDUDE: Reading fuse bits
  1. Tip: Use “-” as the file name, to write to stdout. Example: avrdude -c usbasp -p m16 -U lfuse:r:-:h -U hfuse:r:-:h -U efuse:r:-:h

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives
Categories
%d bloggers like this: