HOW TO PROGRAM A BRICKED MEGA2560
This is a how-to as to the reprogramming of a bricked MEGA2560. I bought a cheap clone on Ebay but in no time the usb-chip was fried for no reason. All of the leds on the board were lit and it was not recognized by windows anymore. Also it didn't run the existing programm. Since more people have the same issue with this board and no good answers are available on the internet, I share this information.
I noticed that the regulator was very hot and the USB-IC (ch340) also. I suspected it to be damaged so I decided to remove this chip from the board.
Why not program the board with Arduino IDE? I tried this with other mega as programmer, with USBASP programmer, with avrdude, with FLIP, but no results. Finally I discovered that programming it with ProgISP works.
What do you need:
An USB-ASP AVR programmer, bought from Ebay <2$.
six dupont wires male to female.
Download ProgISP and install it.
for further information on installing of ProgISP.
Connect the dupont wires to the flatcable and to the MEGA ICSP header.
When it proved to work you can put tape around the dupont connectors.
The file you want to upload to the Mega is a .hex file, Arduino IDE compiles these files and puts them in (par example) c:/users/your-user-name/Appdata/local/temp/build12345678987654321.temp, check the date to determine which builddirectory you need. Lets say you want to program a sketch "blink". You open it in Arduino IDE and compile it (click on verify). In the mentioned path you find a buildnnnnnnnnnnnn.tmp map with today's date. In this map you will find the file blink.ccp.hex. I copy this file to an easy to find place, in a directory called arduino_hex in the root of my HD.
Now start ProgISP en open this file with "load flash". Then click "auto" and see what's happening...
Its also easy to program a bootloader to the board with this method, these are found in Arduino/hardware/arduino/bootloaders/stk500v2. This is also a .hex file and can be flashed in the same way. Although, without a working USB there is no point in doing this...