I don't know much about microcontrollers in general, and I don't know much about Atmel microcontrollers or the Arduino platform/IDE. I've attempted to use Google to search for a solution, but I can't seem to find anything that helps.
I'll try to make a long story as short as possible. I purcased a used Arduino, with a bad 16U2 (USB interface) microcontroller. I should have just used it as is, or thrown it away, but I thought "eh, why not. I'll buy another 16U2 and have a go at fixing it." I got the new chip installed, and was trying to reprogram it using my USBtiny and AVRDUDE. (I know about the 6 pin ICSP header for the 16U2)
I barely know how to use AVRDUDE and the USBtiny, but I have learned a costly lesson. "Erase chip" will indeed erase. If only I didn't have the "good" Arduino connected at the time. Stupid, careless, many other applicable adjectives - yes, I know. So now I have a known good (hardware) Arduino, with a blank 16U2.
I took a third Arduino, and tried again to read the flash and EEprom from the 16U2. I created two files, one for the flash, and one for the EEprom, and the "Verify" function said the files were good. (They matched the third arduino, Which I've manged to not destroy, so far.)
However, when I attempt to write the flash and EEprom to the bricked arduino, I get a verification error. It won't work.
I suspect that I'm not really reading the "good" arduino because the lock bits are set at 0x0F (unmolested, working unit) , while the blank 16U2 is showing 0x3F for the lock bits. I believe that means the good unit is read-protected. I don't know however.
I attempted to find these files on the internet, but all I can find is a "combined" file that is used with atmel "Flip." "Flip" seems great for firmware upgrades, but since my 16U2 is bricked, it does me no good.
Can anyone help me out of this mess? Are the files available somewhere? I've looked and looked and can't find it. I am horrible at using search engines, so forgive me if they are readily available. Again, I'm not terribly upset at being out two Arduinos, but because one of them has no hardware problems at all, (was working before I got careless and erased its 16U2) I'd like to undo my mistake for general principles.