I somehow managed to damage the USB port (ATMega 16U2 chip?) on my UNO R3 board, after a week or so of purchase.
I now want to attempt a repair, using this article recommended by Pert yesterday.
But as a complete novice I would appreciate help to ensure that I get it right please.
I don't necessarily need to understand what I'm doing at this stage! I can postpone that, but I do need to know the exact steps to get my old board working again. I want to use one UNO in the house on my Win 10 PC and the other in my shed workshop on an old XP PC. Both have IDE 1.8.9 successfully installed.
So if possible I'd like to make the instructions as friendly as possible. Basically what wires to connect between old UNO and new UNO and what steps to then take, such as within the IDE program?
Fairly early in the article I've come across points I'm nervous about.
It does not explicitly cover my ATA MEGA328. Am I right in assuming I can treat it as 'Mega1280 or Mega2560'?
I read: "Please note that the Rev.3 board has an ATMega 16U2 chip that manages the USB connection and also that chip can be reprogrammed via a dedicated connector labeled ICSP2, just above the ATMega 16U2 itself."
That's plainly the case for my board, a photo of which I've shown here:
I assume that is what is faulty and is what I should therefore reprogramme? So, before I study further, must I sadly conclude that this article does not after all provide the detailed instructions I need? Or are the four ICSP1 and ICSP2 pins (and therfore their 'old style' digital pin equivalents) all parallelled?
Thanks, I hope it does prove as easy as that! But as explained in point #2 of my post above I'm still not clear what it is I need to do:
Reload the bootloader? (And if so, exactly as in that tutorial?)
or
Reprogramme the "...ATMega 16U2 chip that manages the USB connection ... via a dedicated connector labeled ICSP2, just above the ATMega 16U2 itself". (And if so, how?)
hammy:
Is this a second post on the same issue ????
No. This is a new thread about repairing the old board with the new. The previous thread was about diagnosing the fault with the UNO.
Quoting my last post in that thread: "I'll start a new thread about attempting to repair it using that potentially excellent article you suggested, pert."
Bottom line: It runs the last sketch loaded correctly, but does not upload any new sketch, giving the errors I reported.
Doesn't that mean that the main chip, the MEGA328, is OK? And that it's the chip near the USB socket that needs repairing?
If the Loop-back test works, it usually means the 16u2 chip is good. If the Loop-back test works, then we could spend our time burning the bootloader on the Atmega328 chip.
Terrypin:
Doesn't that mean that the main chip, the MEGA328, is OK? And that it's the chip near the USB socket that needs repairing?
Although the Arduino as ISP can indeed be used to upload firmware to the ATmega16U2 on Arduino boards, the error message you are getting:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xc6
does not indicate a problem with the ATmega16U2. Your computer is showing a port when you plug it in and that would likely not happen if there was a problem with the chip.
There are two separate programs on the ATmega328P. One is the sketch program you last uploaded. The other is the bootloader. The bootloader is a small program that takes data from the serial port and writes it to flash memory on the ATmega328P. This is what makes the sketch upload process work. The errors you're getting could be caused by a missing or damaged bootloader If that is the problem, it would be fixed by using an Arduino as ISP to burn the bootloader on the ATmega328P.
Thanks both. I'll (somewhat nervously) go for the bootloader burn approach later today, using the digital pins connection option, as that is clearer for me.
pert:
You need to select Tools > Programmer > Arduino as ISP.
I did. That was in the tutorial and article.
EDITED:
I carefully repeated the exercise and this time it appeared to be successful, as there was much rapid action from LEDs. And when I powered up the old UNO, pin 13 LED was static. It was at last no longer running the old sketch!
However, when I tried to upload a sketch, once again it failed, with errors that looked rather similar to some of the previous ones. Here's a link to one verbose example:
Please post output directly to the forum whenever possible. Many forum members won't bother to visit an external site so posting the text externally will make it less likely for you to get help.
Terrypin:
once again it failed, with errors that looked rather similar to some of the previous ones.
This error is completely different from the "avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xc6" errors you were getting before. The problem is that you forgot to select the COM port of your Uno from the Tools > Port menu. Usually Windows will enumerate each Arduino board to a different COM port. The COM port assigned to your old board was COM3, while the COM port assigned to the new board you were using as an Arduino as ISP is COM4. You need to select COM3 from the Tools > Port menu.
Insert cable in 'repaired' UNO board, check board, port and programmer. "The problem is that you forgot to select the COM port of your Uno from the Tools > Port menu. Usually Windows will enumerate each Arduino board to a different COM port. The COM port assigned to your old board was COM3, while the COM port assigned to the new board you were using as an Arduino as ISP is COM4. You need to select COM3 from the Tools > Port menu"
I'm not following that point, pert.
Both IDE and Device Mgr have shown COM3 throughout. COM3 was selected at each stage. COM4 was not on offer .
Run Blink sketch. Fails to upload. As does any sketch, just like before the repair attempt. Here is the error report from my latest test.
I get this when I try to embed the text:
The message exceeds the maximum allowed length (9000 characters).
That's why I previously used a link instead. So I've cut out an arbitrary section in the middle. Here also is a link to the full text file. https://www.dropbox.com/s/dhg7rn63ipavxb0/LatestFailure.txt?raw=1
Arduino: 1.8.9 (Windows 10), Board: "Arduino/Genuino Uno"
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\terry\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10809 -build-path C:\Users\terry\AppData\Local\Temp\arduino_build_613884 -warnings=none -build-cache C:\Users\terry\AppData\Local\Temp\arduino_cache_237603 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino
.
.
.
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\terry\AppData\Local\Temp\arduino_cache_237603\core\core_arduino_avr_uno_0c812875ac70eb4a9b385d8fb077f54c.a
Linking everything together...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_613884/Blink.ino.elf" "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_613884\\sketch\\Blink.ino.cpp.o" "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_613884/..\\arduino_cache_237603\\core\\core_arduino_avr_uno_0c812875ac70eb4a9b385d8fb077f54c.a" "-LC:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_613884" -lm
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_613884/Blink.ino.elf" "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_613884/Blink.ino.eep"
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_613884/Blink.ino.elf" "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_613884/Blink.ino.hex"
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-size" -A "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_613884/Blink.ino.elf"
Sketch uses 930 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM3 -b115200 -D -Uflash:w:C:\Users\terry\AppData\Local\Temp\arduino_build_613884/Blink.ino.hex:i
avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : COM3
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x34
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x34
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x34
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x34
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x34
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x34
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x34
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x34
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x34
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x34
avrdude done. Thank you.
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
I then attempted to get the two UNO boards assigned different ports:
Device Mgr > Ports
Regardless of which board was plugged in, this showed only two entries:
Arduino Uno (COM3)
Communications Port (COM1)
Selected View > Show hidden devices.
Another entry also named COM3 appeared, with a different (grey) icon..
With that selected, Right click > Properties > Port Settings > Advanced
In the 'COM Port Number' box, changed COM3 to COM4 and OK'd out of all dialogs.
With 'Show hidden devices' disabled, Device Mgr and IDE now show different ports when they are plugged in. The new (properly working) UNO R3 shows COM3. The older board shows COM4.
But updating Blink onto the latter still fails. This error
Arduino: 1.8.9 (Windows 10), Board: "Arduino/Genuino Uno"
avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : COM4
Using Programmer : arduino
Overriding Baud Rate : 115200
Tried a PC reboot. No change.
I'm still wondering about that same point #2 I raised in my opening post, where I quoted this from the instructions:
"Please note that the Rev.3 board has an ATMega 16U2 chip that manages the USB connection and also that chip can be reprogrammed via a dedicated connector labeled ICSP2, just above the ATMega 16U2 itself."
Should we now be focusing on that? If so, what exactly are the steps required to reprogram it please? BTW, I also saw a YT tutorial that appeared to be recommending a reset of the 16U2 chip by briefly shorting one of the six pins to gnd. Not sure which. It would be useful to find a pin diagram.
I’d hoped to have repaired or reprogrammed this USB/UART/whatever chip somehow, as everything up to and including the compile stage works OK. But guess I’ll have to give up.
Try the Loop-back test on your Good Uno first so you can see how it works. Then try it on your bad Uno . Make sure you are selecting the correct Com port and only plug in one Arduino at a time.