[SOLVED] How to ISP the USB-Serial chip on the UNO?

I want to restore the original firmware to my UNO USB-Serial chip. The previous code used up all the space and the DFU bootloader was erased. I am wondering how to use avrdude to upload the code from the command line.

Here's a description of how to reprogram the communication processor on an Uno. Is that what you were looking for?

Sorry, I need to ISP. I erased the bootloader with the previous firmware which was too big for a 8u2. The tutorial assumed a 8u2 and I have a 16u2. >:(

Maybe this?

Ok, I fixed my problem. I hacked a batch file (running Windows) to take a baud rate and COM port and now it burns the firmware! :slight_smile:

Anyway, for all you windows users, here it is!

@echo off
REM Upload new firmware to ATmega8U2 on Arduino Uno

set TOOLS=C:\Users\Isaac\Desktop\arduino_1.6.4\arduino-1.6.4\hardware\tools
set AVRDUDE="%TOOLS%\avr\bin\avrdude"
set AVRCONF="%TOOLS%\avr\etc\avrdude.conf"
set /p BAUD=Enter baud rate:
set /p PORT=Enter port number:

%AVRDUDE% -C%AVRCONF% ^
  -p atmega16u2 -P com%PORT% -b %BAUD% -c stk500v1 -v -F -e -u ^
  -U efuse:w:0xF4:m ^
  -U hfuse:w:0xDF:m ^
  -U lfuse:w:0xFF:m ^
  -U flash:w:UNO-dfu_and_usbserial_combined.hex ^
  -U lock:w:0x2b:m

pause

It assumes you have a 16u2 and that your ISP is stk500v1.

Ok, so now I have a new problem. I can't put the 16u2 into DFU!

I am now using HoodLoader2 (GitHub - NicoHood/HoodLoader2: 16u2 Bootloader to reprogram 16u2 + 328/2560 with Arduino IDE). Nico is awesome! I am about to log out using the KeyboardLogout example on my 16u2. It make the Uno feel like a whole different animal.

One possible method: How to flash the USB chip on the Arduino Uno