Pages: [1]   Go Down
Author Topic: Arduino Uno Upload Errors  (Read 1137 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi All!

I'm working on a project for school using my Arduino Uno (less than 1 month old). I'm trying to upload my program, which compiles just fine on my PC (64bit Windows 7). I was able to upload programs to the board earlier today, but now when I try to upload a slight modification of the very same program, I get the following error:

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

I've tried pretty much everything on the troubleshooting page of the website, but no matter what I do, it still won't accept anything that I try to upload. My program isn't very large at all (only 1660 bytes).  I'm using the board to handle control systems for an autonomous vehicle. I was trying to upload to the board while it was still plugged into everything in the vehicle (with the vehicle powered off) when it stopped working. Haven't added or removed anything from my computer recently.

Verbose output is pasted below. Thanks in advance for your help everybody!

C:\...\Downloads\arduino-0022\arduino-0022\hardware/tools/avr/bin/avrdude -CC:\...\Downloads\arduino-0022\arduino-0022\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P\\.\COM4 -b115200 -D -Uflash:w:C:\...\AppData\Local\Temp\build5819782041287689058.tmp\ECE_110_Car.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:\...\arduino-0022\arduino-0022\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : \\.\COM4
         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=0x00
avrdude: Send: Q [51]   [20]
avrdude: Recv:
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

avrdude done.  Thank you.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm receiving the exact same error on my  Arduino  Uno as "thexcguy" posted above. 

When I try uploading  a program to COM port 3, I receive the following:

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

My board is just over one month old.  Last week, I had no problems uploading code to the board.

Thanks
Logged

Woods Cross, UT
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Same problem here running Windows XP SP3.  If I change to a different machine running Windows it works fine.

A few days ago I reloaded the blink sketch from this other machine that would connect, let the board sit unpowered for a day or so, retried on the problem machine and it worked.  Overnight, however, it has developed the same upload/connection problems.
Logged

Christchurch, New Zealand
Offline Offline
Jr. Member
**
Karma: 0
Posts: 69
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Same problem here running Windows XP SP3.  If I change to a different machine running Windows it works fine.

A few days ago I reloaded the blink sketch from this other machine that would connect, let the board sit unpowered for a day or so, retried on the problem machine and it worked.  Overnight, however, it has developed the same upload/connection problems.

please try the following fix and report back on how it works:

place a diode between RESET and 5V on the POWER connector, with the cathode (end with the bar) towards the 5V. it will need to be a small-signal one, such as a 1N914, 1N4148. note that a 1N4002 or similar power diode will likely NOT work.
Logged

Wisconsin, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was having the same problem.  Also, when I started I showed 2 COM ports in the Arduino drop-down:  COM3 and COM4.  The UNO board was connected to COM4.  At one point COM4 was deleted and only COM3 remained.  After that I had the resp=0x51 errors.

I tried the diode between reset and 5V. Also, I disconnected the UNO and went to Windows Hardware Manager and scanned for hardware changes.  COM4 was then displayed. I selected it, compiled my sketch and everything worked.

Thanks for the suggestion. Can you explain what the "reset-diode-5V" connection accomplished?

Dave.
Logged

Christchurch, New Zealand
Offline Offline
Jr. Member
**
Karma: 0
Posts: 69
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the suggestion. Can you explain what the "reset-diode-5V" connection accomplished?

there is a major flaw in the way automatic reset is accomplished in all arduino designs, such that under just the right conditions unpredictable results can occur when trying to upload a sketch - ranging from intermittently being unable to upload, to (possibly) corrupting the bootloader. see this thread for details:
http://arduino.cc/forum/index.php/topic,64256.0.html

the diode fix should be applied to every arduino (in my opinion!), and represents the first thing to try when an arduino board starts behaving weirdly. the diode has NO detrimental effect, and may/should be soldered permanently in place.
Logged

Wisconsin, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Robert -- Thanks for the reference.  I'm a newbie but looking to learn fast.  This helps.

Dave.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the advice everyone!  I really appreciate it.

I took the board to a friend who has a fair amount of Arduino experience and he said that the memory on my ATmega328 was corrupted (which I was really surprised by) and the USB-to-Serial chip on the board was dead.  Is this something that can actually happen?  He speculated that a power spike (I was powering it through the 5V, which, as I understand, does not go through the regulator) could have been the cause. I'll certainly try everything suggested to see if the board is actually saveable though, as I'd really like resurrect it if possible.
Logged

Woods Cross, UT
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

please try the following fix and report back on how it works:

place a diode between RESET and 5V on the POWER connector, with the cathode (end with the bar) towards the 5V. it will need to be a small-signal one, such as a 1N914, 1N4148. note that a 1N4002 or similar power diode will likely NOT work.

I just tried the diode and have the same results.  Still not working.  I have an UNO board model R2.
Logged

Woods Cross, UT
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I guess I have weird Windows XP port behavior.  My Arduino is listed on the Device Manger as being on Port 13.  It won't connect with the IDE (or the other software which I'm using to connect with the Arduino via serial) unless I select Port 3.

I don't know why Windows is mixing up ports.
Logged

Pages: [1]   Go Up
Jump to: