Avrdudess guidance required

hey everyone. so this topic is kinda a continuation of my previous topic but not really although I will put the link to the other topic bellow so that you know why I'm trying to upload a new bootloader to my arduino uno R3 with the atmega16u2 chip:

now for my actual problem. I have been trying to use the avrdudess GUI to upload a hex file into my atmega16u2 but when I try to upload I get the error:

Device signature = FF FF FF (retrying)
Device signature = FF FF 00
Error: expected signature for ATmega16U2 is 1E 94 89
  - double check chip or use -F to carry on regardless

Avrdude done.  Thank you.

I will send a picture of my avrdudess settings as well. I am also using another different arduino uno with a ch340g chip as the isp. also pictures of the front and the back of my board are present in the previous topic that I linked at the beginning. my question now is whether I should or can match the expected signature or maybe just force the avrdudess to flash the chip anyway.

Thank you in advance for your help

When I use an Arduino with a CH340 UART adapter as the programmer device, I have to install a 10uF capacitor from its Reset pin to ground. Otherwise it won't work. That's the case, for example, if I use a Nano clone as the programmer. I believe the reason is that the CH340 driver version I have toggles the DTR line, and that resets the Nano, which is not what you want. The capacitor prevents the voltage on the Reset pin from going low enough to trigger a reset.

I've also tried using a Pro Mini as the programmer. It doesn't have a UART adapter, so I hook up an external FTDI UART adapter, and it works fine without the capacitor.

Edit: By the way, an easy way to test if it's working is to just read the fuse bytes. If that works, the code upload should work also. And that's a test that doesn't try to erase anything.

1 Like

I do already have a 10uF capacitor connected between the reset pin and the ground pin but still the problem persists. also I have tried programming it with the force option on but I get this error and I haven't really dared turning off the verification because I'm afraid I might brick the board:

Device signature = 00 00 00 (retrying)
Device signature = 00 00 00 (retrying)
Device signature = 00 00 00
Error: invalid device signature
Warning: expected signature for ATmega16U2 is 1E 94 89
Reading 7414 bytes for flash from input file Arduino-COMBINED-dfu-usbserial-atmega16u2-Uno-Rev3.hex
Writing 7414 bytes to flash
Writing | ################################################## | 100% 8.39s
Reading | ################################################## | 100% 4.50s
Warning: flash verification mismatch
  device 0x00 != input 0x90 at addr 0x0000 (error)
Error: flash verification mismatch

Avrdude done.  Thank you.

I have also tried reading the fuses but I face the exact same error of the signature being different. I will attach a picture of my setup bellow

I don't have any other ideas, other than to make sure all the jumpers are good.

okay so at this point I have spent quite a few days on this problem and I have exhausted every option and tried out whatever ways I could find online but still no luck with the atmega16u2 programming. and I have checked everything in programmer arduino setup and it recognizes the atmega328p quite easily and interacts with it without any problems but when I try to program the atmega16u2 on that same board I get no response. I have also done the loop back test: (Loop-Back Test Instructions) to check to see if my chip is bad and everything was fine and also the board uploads and interacts with IDE perfectly fine so I don't think the atmega16u2 has any problems. at this point I'm at a complete loss. can anyone help me at least get an answer on what the problem might be? and also can someone else try the same setup since it's quite a simple setup and see whether they can get response from their atmega16u2 or not? I have uploaded the picture that I use as reference for the pins bellow

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