SOLVED. Arduino Mega no communication

Hi all.

So I finally dug out my Arduino boards from the loft. I have 4 uno's, 2 Mega's and one Due.

All worked fine except one Mega. The PC would not detect it. Using the other Mega on the same PC and cable its worked fine and I could upload a sketch.

Using one of the UNO's as an ISP I can upload a sketch via ISP pins to the faulty Mega and it works but still no connection to the PC via USB. I suspected an issue with the mega16U2 so I wrote the firmware to the mega16U2 using AVRdude and command prompt with the UNO in ISP. The upload worked great and now the PC detects the Mega and I can see it as a port in the IDE. I can get board info and this works. I can run a loopback test and this works but unfortunately it won't upload a sketch and I get the following error:

Using Port : COM13
Using Programmer : wiring
Overriding Baud Rate : 115200
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout

Any advise would be gratefully received. Could the Mega16U2 be faulty? I have burnt the bootloader to the Mega2560 but I still have the same issue.

When you upload a sketch via ICSP, you wipe the bootloader from the 2560.

So you might be able to recover your board by burning the bootloader (via ICSP using the Uno as the programmer).

1 Like

Thanks for the reply. That is so weird as I had already burnt the bootloader via ICSP. Anyways I just did it again as your suggestion and it worked. My board is working again. Thank you.