Hello everyone,
I'am staying in African country and recently bought an Arduino Uno r3 model which i don't know fake or not. When i plugged in it shows Arduino Uno(Com3) on device manager. I tried to run some led tests, upload codes and everything works well. Also on IDE when programmer selected as "ArduinoISP" But i want to use this card as HID device like keyboard. For this i've learnt that i need to use jumper to reset AT16u2 chip but whatever i do, i'm getting USB disconnected-connected sound but on device manager still shows "Arduino Uno" nothing like ATmega16u2. If i try to use Flip app it doesn't connecting USB giving ".dll not found" and "could not load dynamic library" errors. So how can i solve this problem. I can't find electrician if i need another arduino to fix this also the store is so far away from me. Thank you for everyone.
I've tried all these pins even now more than 30 tabs open but nothing working at all. Firstly i've tried 1-2-3-4 alone then i kept trying 1,2 options while using another pin from gnd to capasitors. Led blinks few times when i unplug USB it still shows like "Arduino Uno" More than thousand things i've tried so far but can't solve. I am exhausted so much.
your board is clone, not fake.
i think you not really used programmer. in this case no matter what is selected in programmer option.
if ATmega16u2 is reseted it stops working as USB-UART converter and PC sounds "device disconnected", for several seconds it awaiting instructions, like to go into DFU mode, now can Flip take control, but it seems you have not working Flip software, reinstall it.
Thank you for responding. I've reinstall Flip with admin rights, without admin, i did download .dll file because app was giving error "AtLibUsbDfu.dll not found" still not solved. It doesn't allow me use usb as communication. While jumper on board Arduino Uno disconnecting when i remove jumper connecting again. So i still see as "Arduino Uno" also tried other USB connections too. Tried on another laptops all same.
If that is a clone, it should not have the Arduino branding.
Use the procedure that is documented here:
I don't see any point in messing with any other pins or a capacitor.
It might be that the manufacturer of the board didn't flash the ATmega16U2 chip with the DFU firmware that allows firmware updates using the Atmel FLIP software.
There is an alternative method of flashing different firmware to the ATmega16U2 chip. The alternative is to connect an ISP programmer to that 2x3 ICSP header next to the ATmega16U2 and then use the AVRDUDE uploader tool to flash the new firmware binary. If you don't own a dedicated ISP programmer, you can make a DIY "Arduino as ISP" programmer from a spare Arduino board:
But this is a fairly complex endeavor. The easiest solution would be to use an Arduino board that has native USB capabilities. With one of those boards, there is no need for any special firmware update process. You just add the HID code in the Arduino sketch and upload it to the board using Arduino IDE just like any other sketch. I can recommend a few boards with native USB capability:
I've already sent pictures that i've tried this document and used jumper in same way also im in Africa where impossible to find other models. To order another model from another country will cost me at least 3-4 months plus cargo fee. I will try to search about flashing method but i have no knowledge and i'm foreigner for terms. As 2nd board i only have Arduino Nano with Mega328p will take a look if flashing Uno possible with it.
Yes, it is possible. You can use the Nano board as an "Arduino as ISP" programmer.
It is so difficult to reach information about it, so many topics about flashing by using Uno for other devices. On chatgpt it says i need 10µf placed on Nano, i want to know if it's possible without placing this capacitor? I don't have any info about circuits i am programmer. Do you know any source about Uno flashing by Nano?
The answer is "probably". I find that I often don't need to add the capacitor. So it is worth a try without the capacitor if you don't have one on hand.
You can follow these instructions:
This procedure might put your board into an unusable state that is difficult or impossible to recover it from. USE AT YOUR OWN RISK!
A. Prepare "Arduino as ISP" programmer
I will refer to the board which will used as an "Arduino as ISP" as the "programmer board" from here on. The UNO on which you are flashing the ATmega16U2's firmware will be referred to as the "target board".
-
Disconnect the USB cable of the Arduino boards from your computer.
-
Make the following connections between the pins on the "programmer board" and the 2x3 ICSP header next to the ATmega16U2 and USB socked on the "target board".
Programmer Target CIPO (AKA "MISO") CIPO VCC 5V (VCC on 3.3 V boards) SCK SCK COPI (AKA "MOSI") COPI 10 RESET GND GND The pinout of the ICSP header:
(the position of pin 1 is indicated by the white dot on the silkscreen of the UNO PCB next to that corner of the ICSP header) -
Connect the "programmer board" to your computer with a USB cable.
-
Select File > Examples > 11.ArduinoISP > Arduino ISP from the Arduino IDE menus.
-
Select your "programmer board" from Arduino IDE's Tools > Board menu.
-
Select the port of your "programmer board" from Arduino IDE's Tools > Port menu.
-
Select File > Preferences... from the Arduino IDE menus.
The "Preferences" dialog will open. -
Uncheck the box next to Show verbose output during:
☑compilation in the "Preferences" dialog. -
Check the box next to Show verbose output during: ☐ upload.
-
Click the OK button.
-
Select Sketch > Upload from the Arduino IDE menus.
-
Wait for the upload to finish.
You are now ready to flash the ATmega16U2 using your "Arduino as ISP" programmer.
B. Flash Firmware
Instructions for flashing the firmware:
-
Scroll up the black console window at the bottom of the Arduino IDE window until you see the
avrdudecommand that was generated for the upload you did during the previous step in the instructions.
It will look something like this:"C:\Users\per\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\per\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM4" -b115200 -D "-Uflash:w:C:\Users\per\AppData\Local\Temp\arduino\sketches\3CE2C63F5AF3D27321A8DBCFAF589898/sketch_jul16a.ino.hex:i" -
Select the full text of the upload command.
-
Press Ctrl+C.
This will copy the selected text to the clipboard. -
Next, you need to modify the upload command to read the hex file out of your Arduino board:
-
Start any text editor program.
-
In the text editor window, press Ctrl+V.
This will paste the command into the text editor. -
Make the following modifications to the command:
- Add
&to the start of the command. - Change
-patmega328pto-patmega16u2 - Change
-carduinoto-cstk500v1 - Change
-b115200(or-b57600) to-b19200 - Remove
-D - Change the path after the
-Uflash:w:flag to the path of the.hexfile you want to flash to the ATmega16U2.
You should now have a command that looks something like this:
&"C:\Users\per\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\per\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega16u2 -cstk500v1 "-PCOM4" -b19200 "-Uflash:w:C:\Users\per\Downloads\foo.hex:i" - Add
-
Press Ctrl+A.
The command will be selected in the text editor. -
Press Ctrl+C.
This will copy the selected text to the clipboard. -
Click the Windows "Start" button.
-
Type
powershellin the search field. -
Select "Windows PowerShell ISE" from the search results.
A "Windows PowerShell ISE" window will open. -
Click on the terminal panel of the "Windows PowerShell ISE" window.
ⓘ The terminal panel is the part that has the command prompt likePS C:\Users\per> -
Press Ctrl+V.
This will paste the copied command into the PowerShell terminal. -
Press the Enter key.
-
Wait for the command to finish successfully.
-
Disconnect the USB cable of the "programmer board" from your computer.
-
Disconnect the "programmer board" from the "target board".
Restoring the Original Firmware
If you ever decide you want to go back to the original firmware, you can download it from this link:
You can then repeat the "Flash Firmware" instructions I provided above, except this time use the path to that Arduino-COMBINED-dfu-usbserial-atmega16u2-Uno-Rev3.hex file in the -Uflash:w: flag.
The firmware from the Arduino-COMBINED-dfu-usbserial-atmega16u2-Uno-Rev3.hex file has the DFU capability, so after you flash that firmware you will be able to use Atmel FLIP for future firmware updates if you prefer (though you might find the ISP programmer approach to be easier after you have successfully performed it a couple of times).
I've just tried this but powershell gives error messsage. Also when usb connected only green leds shows on with both boards after running command it turns on red led on Nano which im using flash the Uno. Is there anything wrong on connections?
Error on Windows PowerShell ISE;
avrdude.exe :
At line:1 char:1
- &"C:\Users\MeQira\AppData\Local\Arduino15\packages\arduino\tools\avrd ...
-
+ CategoryInfo : NotSpecified: (:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError
avrdude.exe: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is
"C:\Users\MeQira\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM6
Using Programmer : stk500v1
Overriding Baud Rate : 19200
avrdude.exe: stk500_getsync() attempt 1 of 10: not in sync: resp=0x15
avrdude.exe: stk500_getsync() attempt 2 of 10: not in sync: resp=0x15
AVR Part : ATmega16U2
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC6
RESET disposition : possible i/o
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 512 4 128 9000 9000 0x00 0x00
flash 65 6 128 0 yes 16384 128 128 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : STK500
Description : Atmel STK500 Version 1.x firmware
avrdude.exe: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14
avrdude.exe: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x02
avrdude.exe: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
Hardware Version: 4744608
Firmware Version: 0.4611299
Topcard : STK502
Vtarget : 1.8 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us
avrdude.exe: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01
avrdude.exe: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude.exe: stk500_disable(): protocol error, expect=0x14, resp=0x10
avrdude.exe done. Thank you.
Unfortunately I don't know what causes this specific error. Maybe one of the other forum members has an idea.
From the output you shared, it looks like your avrdude command is correct.
I did find some information that indicates it could be caused by omitting the auto-reset disabling capacitor between the "RST" and GND pins on the "programmer board". So if you can get your hands on a capacitor, try adding that into the circuit.
I think that a fairly wide range of capacitance values will work in this application. So if you don't have a 10 uF capacitor but have a capacitor of some other value on hand then give that capacitor a try as a substitute for the recommended 10 uF capacitor.
You can also try double checking all the wiring. It looks like you used a breadboard as a way to make two female to male jumper wires into a female to female jumper wire. That is a reasonable approach, but it does introduce more potentially faulty connections into the system. You could simplify the wiring by making the connections to pins 11, 12, 13 on the Nano instead of the ICSP header.
| Nano Pin # | SPI Bus |
|---|---|
| 11 | COPI |
| 12 | CIPO |
| 13 | SCK |
I've tried different size of capacitors 2.2 to 220uf including 10uf which collected from old adaptors and modems but still doesn't work. I've also tested capacitors with leds they are working well. Keep getting this error "avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude.exe: Device signature = 0x000000 (retrying)
Reading | ################################################## | 100% 0.02s
avrdude.exe: Device signature = 0x000000 (retrying)
Reading | ################################################## | 100% 0.02s
avrdude.exe: Device signature = 0x000000
avrdude.exe: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
avrdude.exe done. Thank you.
"
![]()
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.





