Arduino UNO wont program "stk500_getsync(): not in sync: resp=0xb4" ......

in an accident the +12v rail on custom LED driver shield was bridged with the +5v rail killing the ATmega8U2-MU. this board was working before, and the ATMEGA238P-PU code is still working correctly for that rev.

i ordered a replacement part for the board and replaced it.
then i installed Flip (from ATmels site) and used hex file in arduino0022 to reprogram the 8u2 to be a USB-to-serial programmer
\arduino-0022\arduino-0022\hardware\arduino\firmwares\arduino-usbserial\Arduino-usbserial-uno.hex

i'm trying to upload the example blink code and i get this. i have tried pressing reset right before i send the code and still get this problem. also noticed that the serial monitor is not working for any baud rate, its just spitting out garbage as if the baud rate is off.
i have the correct COM port selected and the right board selected as well.

 Binary sketch size: 1018 bytes (of a 32256 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0xb4
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0xbc

full version

Binary sketch size: 1018 bytes (of a 32256 byte maximum)
C:\Documents and Settings\<user>\Desktop\arduino-0022\arduino-0022\hardware/tools/avr/bin/avrdude -CC:\Documents and Settings\<user>\Desktop\arduino-0022\arduino-0022\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P\\.\COM3 -b115200 -D -Uflash:w:C:\DOCUME~1\xxxxxx~1.xxx\LOCALS~1\Temp\build2230221425144217936.tmp\Blink.cpp.hex:i 

avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "C:\Documents and Settings\<user>\Desktop\arduino-0022\arduino-0022\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : \\.\COM3
         Using Programmer      : stk500v1
         Overriding Baud Rate  : 115200
avrdude: ser_open(): setting dtr
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Recv: 
[b]avrdude: stk500_getsync(): not in sync: resp=0xbc[/b]
avrdude: Send: Q [51]   [20] 
avrdude: Recv: 
[b]avrdude: stk500_disable(): protocol error, expect=0x14, resp=0xbd[/b]

avrdude done.  Thank you.

i have a video of the board behavior to upload but i have to wait till i get home form work to do so.

Have you done a search for your error message to find out what kinds of problems typically give that error message? Try just the first part "stk500_getsync(): not in sync:" and see what you get.

Don

floresta:
Have you done a search for your error message to find out what kinds of problems typically give that error message? Try just the first part "stk500_getsync(): not in sync:" and see what you get.

Don

yes i have tried searching there is no real answer to fix it...

also the resp that comes up in search is resp=0x00 not 0xb4

here is the video

tried it with rev0021

Binary sketch size: 1010 bytes (of a 32256 byte maximum)
C:\Users\keaton\Desktop\arduino-0021\arduino-0021\hardware/tools/avr/bin/avrdude -CC:\Users\keaton\Desktop\arduino-0021\arduino-0021\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P\\.\COM6 -b115200 -D -Uflash:w:C:\Users\keaton\AppData\Local\Temp\build3540634906812672847.tmp\Blink.cpp.hex:i 

avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "C:\Users\keaton\Desktop\arduino-0021\arduino-0021\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : \\.\COM6
         Using Programmer      : stk500v1
         Overriding Baud Rate  : 115200
avrdude: ser_open(): setting dtr
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Recv: 
avrdude: stk500_getsync(): not in sync: resp=0xb4
avrdude: Send: Q [51]   [20] 
avrdude: Recv: 
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0xbd

avrdude done.  Thank you.

ok, so i borrowed my friends Duemilanove and programmed it as a ISP programmer, then hooked up the 2 boards and sent the command line to program the uno
followed this how to Installing an Arduino Bootloader - learn.sparkfun.com
and used this .hex file to reprogram the boot loader
\arduino-0022\arduino-0022\hardware\arduino\bootloaders\atmega\ATmegaBOOT_168_atmega328.hex
was that the right bootloader?

now i get

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

help, anyone?

That bootloader, or this one
optiboot_atmega328.hex

CrossRoads:
That bootloader, or this one
optiboot_atmega328.hex

what is the difference?

keaton:

CrossRoads:
That bootloader, or this one
optiboot_atmega328.hex

what is the difference?

The optiboot loader is smaller so takes up less flash memory space and it also uses a higher baudrate when uploading programs. If your board is a Uno you should use the optiboot. However either will work on the board but it will change which board selection choice you use in the Arduino IDE.

Lefty

retrolefty:

keaton:

CrossRoads:
That bootloader, or this one
optiboot_atmega328.hex

what is the difference?

The optiboot loader is smaller so takes up less flash memory space and it also uses a higher baudrate when uploading programs. If your board is a Uno you should use the optiboot. However either will work on the board but it will change which board selection choice you use in the Arduino IDE.

Lefty

i would like to put it back to the default setting

i programmed the optiboot_atmega328.hex and it still doesn't work :0

i get this

Binary sketch size: 1018 bytes (of a 32256 byte maximum)
C:\Users\keaton\Desktop\arduino-0022\arduino-0022\hardware/tools/avr/bin/avrdude -CC:\Users\keaton\Desktop\arduino-0022\arduino-0022\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P\\.\COM6 -b115200 -D -Uflash:w:C:\Users\keaton\AppData\Local\Temp\build192859749129420746.tmp\Blink.cpp.hex:i 

avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "C:\Users\keaton\Desktop\arduino-0022\arduino-0022\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : \\.\COM6
         Using Programmer      : stk500v1
         Overriding Baud Rate  : 115200
avrdude: ser_open(): setting dtr
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Recv: 
[b]avrdude: stk500_getsync(): not in sync: resp=0x00[/b]
avrdude: Send: Q [51]   [20] 
avrdude: Recv: 
[b]avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51[/b]

avrdude done.  Thank you.

update: i got 2 new ATmega328p's today, I used my friends arduino as a ISP programmer and programmed both with the "optiboot_atmega328.hex"

NO LUCK

i get on all 3 ATmega328p:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

i reinstalled the drivers
still NO LUCK....

I'm gonna retry to reflash the ATmega8u, even though it shows up in program manager as "arduino uno"

i have replaced both IC with brand new ones and flashed them with the newest code.....no luck at getting the board to function.....

windows 7 problem, it did get mad about the drivers...... W7 64bit ultimate

BUMP^^^
anyone?

My 2 cents:

Get an ISP and forget about this ever-lasting bootloader misery. I have a theory wich goes something like this: The bootloader only works if you have an ISP at hand. If you don't have one, the bootloader will find out and start to act up.

If you have an oscilloscope/logic analyzer, make sure the 328 actually gets the reset pulse. Maybe the 100nF capacitor is crap as well. You could use another arduino to look for the LOW pulse, but you must use a voltage divider, as the reset pulse can go up to 2x Vcc ( Vcc --> GND --> 2xVcc --> Vcc).

SOLVED:
after talking with the guys at sparkfun for tech help i reprogrammed ATmega8u through the ISP header

avrdude -p at90usb82 -F -P com4 -b 19200 -c avrisp -U flash:w:UNO-dfu_and_usbserial_combined.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m

reprogrammed the ATmega328p through the ISP header with the hex file form sparkfun

avrdude -p atmega328p -c avrisp -P com4 -b 19200 -U flash:w:optiboot_atmega328.hex -U lfuse:w:0xFF:m -U hfuse:w:0xDE:m -U efuse:w:0x05:m

my other thread on this problem
http://arduino.cc/forum/index.php/topic,68965.0.html

i was having problems with the opti boot files that comes with 0022 release, so use at your own risk :wink:

Glad to see you were able to resolve that.

yeah, me too. IMO the problem was in the optiboot that comes with at the 0022 release. soon as i programmed the board with the hex file form sparkfun things started work, but i programmed the atmega8u2 so there was no questions with the tech at sparkfun just encase another bug showed up