Atmega 16u2 not recognized as usb device

I wanted to use my Arduino Uno R3 as an HID keyboard. For that, i flashed the arduino with a .HEX file for using it as a keyboard. Everything worked fine. when i needed to revert it back to arduino uno, i flashedthe original arduino uno .HEX file and i could use it as a normal Arduino board. I had exams so i stopped using my arduino for about 3 months. Now i took my arduino board and when i plugged it in, it says that u have connected a keyboard. so i understood that last time i forgot to flash arduino hex file. so i shorted the following pins to get the board into DFU mode :-
board
by doing this, the tx and rx pins should blink and in the device manager, i should see "atmega 16u2 listed under atmel devices as in the picture below":


but none of these things happen!!! neither the leds blink nor the atmega 16u2 is listed in device manwsger. it is listed as unknown device.
Things that i have tried :

  • Changing The cable - cable is working.
  • trying it on another laptop - same results
    What should i do? earlier when i used to do this, everything would work the leds blinked, the atmega16u2 was listed in the device manager and i could upload the .HEX file. now none of these things happen.I am very much worried about my arduino. PLease someone help.

Did you release the connection you made between RESET and GND? I don't see you can upload anything if the device is halted.

Also I suggest you look up the IC, it's definitely not a 32U4. :slight_smile:

Yes, Uno does not have a 32U4, it has a 328. Leonardo and Pro Micro have 32U4.

I believe Uno has, in addition to the 328, an 16U4 which is normally used only as a USB-serial adaptor, but it can be flashed to perform other functions.

My Uno R3 has a 16U2 as the USB connection, which agrees with this schematic.

My guess is that the factory firmware included the DFU code and the replacement .HEX did not.

I recommend you get an ISP device for serial programming. You can get a USBasp for under $20 on Amazon or eBay.

Use a pro micro instead. That DOES have a 32U4.
You can read about my project to use the pro micro as a keyboard simulator here

AHHHHH !!! BIG MISTAKE OF ME. I accidentally wrote there 32u4.:man_facepalming:. I mean 16u2 as in the screenshot. It is not visible. Sorry everyone. My mistake.

No i keep the connection for 2 seconds, then i hear a sound from PC which it makes when a device is disconnected. Then i release the connection. After releasing the connection, the LEDs should blink but they don't. And you are right the IC is not 32u4 it is 16u2. My mistake

Will that solve the problem? Should I buy that?

Would he have posted that, if he didn't believe so?

I mean is that the problem with my Arduino? Will that fix the problem?

If the problem is that the bootloader is missing, then yes, you have to install a bootloader. But since you need a bootloader to serial upload, you obviously need to use a different method.

Is it certain? No, because we can only respond to words that are posted here, and make the best possible guess based on those.

Maybe your Arduino is just burned. Who really knows? If you want to play guessing games you will be spending a lot of time on that.

Ok then let me try that

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.