Arduino Mega Firmware Problem

Hi,
I have just bought an Arduino Mega 2560(Clone).
When I first plugged it in, its name in the devices and printers of my windows was "atmega16u2DFU"(maybe slightly different as it changed. See Below). I thought that it is a new type of that I have not encountered yet so I searched for its drivers but then I got to know that it was the same chip that I had on my UNO and my another Mega. I changed cables but still, it was the same problem. then I thought that my chip's firmware is corrupted. Another problem was that the pin13 LED was not blinking when the reset button was pressed. I bootloader mega with my Uno and the reset led became reactive and codes are working when uploaded through the programmer.
Now the only problem is that my computer is not recognizing mega. I followed this tutorial and accoring to me everything went right from start to end. The name of mega in devices change to "unknown device" but my computer still doesn't recognize it. There were slight changes i did in the tutorial as the torial was for uno and i have to do it with mega:
Instead of this:

(From tutorial)
Create or add to your custom boards.txt:

[color=#333333]unorestore.name=UNO 16U2 Restore Firmware

unorestore.bootloader.tool=arduino:avrdude
unorestore.bootloader.low_fuses=0xff
unorestore.bootloader.high_fuses=0xd9
unorestore.bootloader.extended_fuses=0xf4
unorestore.bootloader.file=Arduino-COMBINED-dfu-usbserial-atmega16u2-Uno-Rev3.hex
unorestore.bootloader.unlock_bits=0x3F
unorestore.bootloader.lock_bits=0x0F
unorestore.build.mcu=atmega16u2
unorestore.build.f_cpu=16000000L
unorestore.build.board=uno.build.board=AVR_UNO
unorestore.build.core=arduino:arduino
unorestore.build.variant=standard[/color]

I Did this:

megarestore.name=MEGA 16U2 Restore Firmware

megarestore.bootloader.tool=arduino:avrdude

megarestore.bootloader.low_fuses=0xFF

megarestore.bootloader.high_fuses=0xD8

megarestore.bootloader.extended_fuses=0xFD

megarestore.bootloader.file=Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex

megarestore.bootloader.unlock_bits=0x3F

megarestore.bootloader.lock_bits=0x0F

megarestore.build.mcu=atmega16u2

megarestore.build.f_cpu=16000000L

megarestore.build.board=mega.build.board=AVR_MEGA2560=AVR_MEGA2560

megarestore.build.core=arduino:arduino

megarestore.build.variant=standard

and i pasted mega firmware hex file to: C:\Program Files\Arduino\hardware\arduino\avr\bootloaders
as i got an error that arduino could not find hex file at that location so i pasted it there. else i followed the tutorial.
Thanks
Kalpit Vishnoi

Sounds like the board you got was never programmed; not only was the mega2560 not programmed with the bootloader, the 16u2 used as a serial adapter is not programmed with the firmware that makes it do that.

Since it's showing as a DFU device, uploading the proper firmware should be trivial. Download FLIP from microchip and use it to upload (IDE install location)/hardware/arduino/firmwares/atmegaxxu2/Genuino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-R3.hex to to the device that's identifying itself as a 16u2 DFU and you should be good to go.

Remember that if you upload using programmer to the mega2560, it erases the bootloader, so you have to re-bootload it afterwards.

What do you expect when you buy a clone for a quarter the price of the official board? :wink:

Oh, wait, Arduino has shipped real boards missing the 16u2 firmware too...

When loading the atmega16u2 firmware in flip, it says "address is out of range". what to do? also, it is not showing my mega in the USB connection. how to upload?

Reply?

Choose the version that is suitable for your board, either arduino-usbserial/Arduino-usbserial-uno.hex or arduino-usbserial/Arduino-usbserial-mega.hex

/hardware/arduino/avr/firmwares/atmegaxxu2/arduino-usbserial/Arduino-usbserial-atmega16u2-Mega2560-Rev3.hex

http://https://www.arduino.cc/en/Hacking/DFUProgramming8U2