I thought this might be useful for others who are new to all this with the same issue, as it took me a while to piece together all the info needed.
Yesterday I plugged in my arduino mega 2560 r3 to upload a new sketch and the com port wasn’t available. on checking device manager the arduino device wasn’t there, nor was there an “unrecognized device” I did the usual checks, different usb lead different usb port and different PC all with the same result, nothing.
Doing a bit of research it seems that it is quite a common issue and it is to do with the 16u2 chip on the arduino loosing its firmware. Apparently You can re-flash
the firmware to solve the issue. I found these instructions
But they require a USB ISP Programmer, which I don’t have. I then found this
Which has a diagram for making a serial isp programmer. now my PC doesn’t have a serial port but it does have the header on the motherboard. I found an old cable for attaching a card reader to the firewire header on a motherboard which had plugs with the correct number of pins for the com header and icsp port on the arduino.
And after a bit of chopping I came up with this. (I used 1.5k Ohm resisters as they were the closest I had)
The above corresponds to a “ponyser” device in avrdude (which is in the tools folder in the arduino install directory)
Running the below command which I derived from kurt6string’s post I got (note: I copied the firmware file to the bin directory to make it easier to reference in the command)
On unplugging the arduino from the serial cable I got an unrecognised device, and then un unplugging and re-plugging in the USB I got
I’m not sure from the avrdude output if it actually did reprogram anything as I have never done this before, but its working so i’m not going to dig any deeper.
Lets hope it keeps working.
This may also be useful to work out which icsp pin is which.