What does this mean?

I have an Arduino Mega clone with a corrupt bootloader. I can upload sketches with a USBtiny ISP. But I get the following message:

avrdude.exe: verification error, first mismatch at byte 0x0007              0x00 != 0x1cavrdude.exe: verification error; content mismatch

What does that mean?

How did the bootloader get corrupted ? It sounds like more than just the bootloader is busted.

I tried re-burning the bootloader, but it took a long time, so I unplugged it. That's how the bootloader is corrupt.

I don't know if the USBtinyISP is compatible with the Arduino Mega. Can you try an USBasp programmer ?

Note the restrictions of the USBtiny programmer to work with mega boards:

It cannot program chips with more than 64K of flash, such as the Atmega1280/1281, or Atmega2560/2561

http://www.adafruit.com/products/46

Lefty

Oh. Is my Mega busted then? The serial doesn't seem to work, but the "blink" sketch works fine.

arduinohabib:
Oh. Is my Mega busted then? The serial doesn’t seem to work, but the “blink” sketch works fine.

Can you upload a different example sketch and have it work correctly? If you can then your bootloader is OK, if not it probably isn’t and the bootloader would need to be reburned into the chip.

Lefty

I tried the "analog in serial out" example, with out the usbtinyisp it takes for ever to upload, I doubt it will ever finish uploading. With the usbtinyisp it does upload, but it says,

avrdude.exe: verification error, first mismatch at byte 0x02d7              0xd1 != 0x05avrdude.exe: verification error; content mismatch

and i don't think the board does anything after I upload the sketch.

arduinohabib: I tried the "analog in serial out" example, with out the usbtinyisp it takes for ever to upload, I doubt it will ever finish uploading. With the usbtinyisp it does upload, but it says,

avrdude.exe: verification error, first mismatch at byte 0x02d7              0xd1 != 0x05avrdude.exe: verification error; content mismatch

and i don't think the board does anything after I upload the sketch.

Well we already know that a USBtiny programmer will not work with mega boards and if you can't upload via normal IDE serial/bootloader way then most likely your bootloader is corrupted on the mega board.

Do you have access to another arduino board? Because that can be used to program the bootloader back onto a mega board.

Lefty

Yes, I have an Arduino Uno.

arduinohabib: Yes, I have an Arduino Uno.

Well then you can load the Uno with the a sketch, wire the Uno to the Mega board, that will then burn the bootloader to the mega. Nick's sketch and procedure write up is particularly good.

http://www.gammon.com.au/forum/?id=11635

Lefty

Thanks a lot!

The problem still isn't solved. I think what happened is I plugged the ISP into the USB interface ICSP pins. What can I do? Thank you so much.

You have rewrite the code in that ATmega8U2 chip. The firmware can be found in the hardware folder. For version 1.0.3 it is in the folder: hardware\arduino\firmwares\atmegaxxu2\arduino-usbserial\

After that I would also write the bootloader into the large ATmega328P. That is done with the Arduino IDE.

avrdude does not support atmegau2. What do I do in this case? Is there a configuration file for avrdude? Or is there an other program I can use?

You are right, I didn't know that. But perhaps you didn't write the firmware of the ATmega16U2 or ATmega8U2. Check the fuses first. This thread is about using avrdude with that chip: http://arduino.cc/forum/index.php?topic=107505.0

Thank you! I uploaded and now it works. It recognizes my Mega as an R3 now :)