So far, I could reprogram a circuit with an ATMEGA48PA without problem. Until I got (after apparently was programed successfully):

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

Now every time I try to program it, I get:

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn't answer. 1 
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

On that last unsuccessful program (the one with the verification error) I had pulled down the reset pin manually. Could that have made such harm? According to my multimeter, the reset PIN is pulled up by default (so it is supposed that it is still configured as reset).

  • \$\begingroup\$ did you change fuse bits one last time the programming actually worked? \$\endgroup\$
    – miceuz
    Feb 5, 2013 at 22:26
  • \$\begingroup\$ were you running the atmega with a crystal of without? \$\endgroup\$
    – miceuz
    Feb 5, 2013 at 22:27
  • 2
    \$\begingroup\$ Have you tried another chip? \$\endgroup\$ Feb 5, 2013 at 22:31
  • \$\begingroup\$ I usually get that message when I don't have the micrcontroller powered by the programmer, or I accidentally wire the programmer to the micrcontroller incorrectly. I'm sure you have checked several times, but just in case. \$\endgroup\$
    – capcom
    Feb 6, 2013 at 2:12
  • \$\begingroup\$ @miceuz No, I didn't. I never changed the fuses, so it should have been using the internal oscillator divided by 8. However, the board has a 8MHz crystal. \$\endgroup\$
    – Eduardo
    Feb 6, 2013 at 15:53

1 Answer 1


You can fuse off the Atmega48's ISP interface if you corrupt the incoming programming data stream just-so, but it would be very difficult to do. Although, I've seen it happen with shifted byte streams which your manual override of the reset line could have caused (but still highly unlikely).

It's also possible that the USBASP needs a firmware update (as suggested by the warning message) or merely needs to be re-flashed. As in, you just got unlucky with your timing and really this is an unrelated failure in the USPASP.

avrdude is awful at debugging programming communication problems. You are better off using AVR Programmer (part of AVR Studio) for this.

For the general diagnostic procedure, see this question:

avrispMKII short circuit protection triggering when programming

  • \$\begingroup\$ It worked with the same programmer and the same firmware. I can also program an Arduino (ATMEGA328P) without problem with that programmer, so it may be the case of fuse corruption. \$\endgroup\$
    – Eduardo
    Feb 6, 2013 at 16:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.