I have a SainSmart Mega and when I connect it to my PC, it recognizes it but only as an “unspecified” device and doesn’t give it a COM port (see image) and in device manager it shows up as AT90USB82 (see other image).
I went through this process: Arduino - DFUProgramming8U2, but when I try to load the HEX, FLIP says “address out of range”
I have tried on 2 different computers, a laptop running Windows 10 and a desktop running Windows 7. Same result.
What does it say on the chip behind the USB socket on your board? Is it an AT90USB82, an ATmega16U2, or something else?
Not a high quality picture, but at least legible. Here is the chip.
Ok, I gave this a try. Its not the CH340 (so far as I can tell), but the links to the authentic driver on the site above appear to be corrupt or incomplete.
Any thoughts on this problem? Is it possibly just the price you pay when you buy cheap Chinese knock-offs?
It could be. I've mostly had good luck with the China boards but certainly you have to expect they don't put the highest priority on quality control and using genuine components. I've never seen an Arduino with the ATmega8U2, though from that Playground page I guess it's a thing. It seems strange that the computer identifies it as AT90USB82, which is a different chip from the ATmega8U2.
It seems that people almost never have success with trying to update the firmware on the ATmegaxxU2 USB chips on the Arduino boards. My instinct would be to use an ISP programmer to upload the firmware instead of messing with this DFU thing but I've never had a problem with any of mine so I've always just left that chip alone.
My instinct would be to use an ISP programmer to upload the firmware instead of messing with this DFU thing but I've never had a problem with any of mine so I've always just left that chip alone.
Can you give me more information on what you mean by this? I too have had no problems with my China boards, so this is the first time I've every had to deal with manual firmware updates.
There are two options for flashing firmware to the ATmega8U2:
DFU is done via the standard USB cable on the Mega using the Atmel FLIP software.
The other option is to use an ISP programmer to flash the firmware to the ATmega8U2. There's a 6 pin ICSP header next to the ATmega8U2, just like the other ICSP header next to the ATmega2560 on the other end of your Mega. You can connect an ISP programmer to that header and then use AVRDUDE to flash the firmware to the ATmega8U2. If you don't own a dedicated ISP programmer you can use an extra Arduino board as an "Arduino as ISP" ISP programmer. It's similar to the process you would use to burn a bootloader to your Arduino's main microcontroller except that it's not possible to do this process via the Arduino IDE. You need to run the appropriate avrdude command from the command line but you can use the copy of AVRDUDE that's included with the Arduino IDE if you like.