The 16U2 exploded on my MEGA2560. The MEGA was controlling a car EFI shield and some large current decided to GND through the USB into a laptop that was being powered by the same car battery.
I don't have much experience and don't know what I'm doing - only 2 years as a hobby - so I search errors, and what I can think of, and this is where I'm up to.
Not knowing what a 16U2 was - I found out latter it was a micro - I soldered in a new one.
I plugged it into a PC and nothing in Device Manager.
More reading and I found out it needed a driver - something DFU I think - so I loaded one - it says libusb0 - and now it sees it as ATmega16U2 device in Device Manager, but not as a MEGA driver in COM.
After more reading it looked like the 16U2 needed firmware so I used FLIP to load "MEGA-dfu_and_usbserial_combined.hex" from the IDE, and now it comes up as MEGA on COM20.
Going to IDE it seams to see it - Board Info comes up -, but it doesn't seam to actually communicate.
I tried to load Blink through USB, but it says :-
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
More reading and I try the Loopback test, and whatever I type in Serial Monitor comes back to the box below. I assume that the 16U2 is doing what it's supposed to do.
Thinking the 2560 is blown I load a blink sketch through the ICSP, and it works.
I test the traces between the 16u2 and 2560 with a DMM from pin to pin - this checks if the solder is cracked under the pin - and there is continuity.
I now test if TX straight out of the 2560 is working with the sketch below - someone else wrote this and told me what to do because I don't know what I'm doing.
void setup()
{
Serial.begin(57600);
}
void loop()
{
Serial.println("Hello world");
}
Hello World comes streaming out of the USB when I select baud 500000. I think the TX on the 2560 is working.
Next I test the RX - again someone else wrote this - that I think is supposed to latch the on-board LED when you enter a character into Serial Mon.
void setup()
{
Serial.begin(57600);
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, HIGH);
delay(3000);
digitalWrite(LED_BUILTIN, LOW);
}
void loop()
{
if(Serial.available()>0)
{
Serial.read();
digitalWrite(LED_BUILTIN, digitalRead(LED_BUILTIN));
}
}
I tried the RX sketch through the USB and every entered character makes the RX LED flash, but that's all.
Would there be anything else that might not make me come to the conclusion that the RX on the 2560 is blown? Ideas welcome, if explained in dummies English
The only thing I can't do is load the correct hex file(Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex) into the 16u2, because FLIP corrupts it and I don't have a hope of working out avrdude. I don't think this would make a difference because the 16u2 looks to work through the USB.
Failed FLIP video -
Thanks