Programming an UNO with an AVRISP mkII used to work

Programming an UNO with an AVRISP mkII used to work, but then I left everything out on my desk for a few months, during which I switched GNU/Linux distros.

While it was working, I had flashed the keyboard HID firmware.

This is what happens now.

[tlevine@perluette ~]$ avrdude -p at90usb82 -P usb -c avrispmkii -U flash:w:UNO-dfu_and_usbserial_combined.hex 

avrdude: stk500v2_command(): command failed
avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: Target not detected
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

[tlevine@perluette ~]$ avrdude -p at90usb82 -P usb -c avrispmkii -U flash:w:UNO-dfu_and_usbserial_combined.hex -B 8 -F

avrdude: stk500v2_command(): command failed
avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: Target not detected
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for AT90USB82 is 1E 93 82
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.

avrdude done.  Thank you.

Ideas? Thanks

Three things...

  1. Stay away from -F.
  2. Ensure the cable from the programmer to the board is connected the correct way around.
  3. Ensure the cable from the programmer to the board is not damaged.

I haven't done number 3. Is there an easy way to test that?

I'd use a multimeter, two alligator clip cables, and two paper clicks to make a crude "test harness" and then test each of the six wires. You could probably use jumper wires to make a complete loop and take a single reading. An LED + resistor + power supply (battery, USB) will also work.

Is there a reason to suspect the cable? Does it work programming other targets?

Try appending " -v -v -v -v" to the command-line. Maybe something enlightening will show up.

Hah! I needed to plug in power; the AVRISP mkII doesn't power the board.

Thanks for the suggestions though

Thank you for the follow-up.