Problem setting ATmega8 fuses

USB AVR Programmer and SPI interface. Adafruit's USBtinyISP.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
mojo
 
Posts: 136
Joined: Mon Jan 21, 2008 5:04 pm

Problem setting ATmega8 fuses

Post by mojo »

Hi.

I have just built a USBtinyISP (thanks ladyada) and am building a USB joystick interface. I am using an external 12MHz clock, which is verified working.

I can read and program the ATmega8 flash memory without any problems, but keep getting errors when trying to set the fuses:

Code: Select all

>avrdude -c usbtiny -p atmega8 -u -U
hfuse:w:0xf9:m -U lfuse:w:0xbf:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9307
avrdude: reading input file "0xf9"
avrdude: writing hfuse (1 bytes):

Writing |                                                    | 0% 0.00s ***faile
d;
Writing | ################################################## | 100% 0.09s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xf9:
avrdude: load data hfuse data from input file 0xf9:
avrdude: input file 0xf9 contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0xf9 != 0xd9
avrdude: verification error; content mismatch

avrdude done.  Thank you.
Am I doing something wrong?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Post by adafruit »

what happens if you stick a "-B 32" before the '-p atmega8' ?

User avatar
mojo
 
Posts: 136
Joined: Mon Jan 21, 2008 5:04 pm

Post by mojo »

Thanks for the reply, I don't know how you find the time!

I did experiment with various settings of -B, but no matter what I put I get the same error message. It seems strange because I can program the flash memory without problems.

Maybe the ATmega8 is broken? I'll get some more tomorrow.

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Post by adafruit »

yeah that is odd. i program bazillions of chip fuses (all the kits are programmed with usbtinys) so i would try another one and let me know. also, what version of avrdude is this?

User avatar
mojo
 
Posts: 136
Joined: Mon Jan 21, 2008 5:04 pm

Post by mojo »

Okay, I tried another two ATmega8 ICs and got the same error with both of them.

I am using avrdude V5.3.1. I tried to get 5.5 to work with the V1.10 drivers but didn't have much luck.

It seems unlikely because I can program the flash memory and verify it, but could the programmer be the problem?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Post by adafruit »

are you powering the device with 5V?

User avatar
mojo
 
Posts: 136
Joined: Mon Jan 21, 2008 5:04 pm

Post by mojo »

Yes, it is USB powered. Not enough current you think?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Post by adafruit »

the only thing im thinkin' is maybe its something like this

http://tinker.it/now/2007/02/24/the-tal ... its-fuses/

can you try the stk500 bridge and then use avrstudio to examine the fuses?

User avatar
mojo
 
Posts: 136
Joined: Mon Jan 21, 2008 5:04 pm

Post by mojo »

I tried the bridge and it worked, I can now set the fuses. Thanks ever so much for the help.

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Post by adafruit »

then its possible its a avrdude problem. ill make a note of it :(

Locked
Please be positive and constructive with your questions and comments.

Return to “USBtinyISP”