Go Down

Topic: avrdude: stk500_getsync(): not in sync: resp=0x00 (Read 739497 times) previous topic - next topic


Hello I am totaly new to Arduino, and I was trying to upload the code I have written.

I am not really experienced at this stuff and I had this problem.

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

The code is as follow :
Code: [Select]

int output[] = {13,12,11,10,9};
int input = 7;
int button;
int n=5;
int pre = LOW;
int state = HIGH;
int z = 0;
int x = 0;
int y =1;

void setup(){
 for(int i=0;i<n;i++)

void loop(){
 button = digitalRead(input);
 if(button == HIGH && pre == LOW){
   if(state == HIGH){
     state == LOW;
     x = n - 1;
     y = -1;

     x = 0;
     y = 1;
       state == HIGH;
       x += y;
       if(z == n){
          z = 0;
 pre = button;

Can anyone give me any advise on where I have gone wrong, what I should do to improve it, and if what I am doing can damage my board.

Thank you very much.


Jul 25, 2009, 03:22 pm Last Edit: Jul 25, 2009, 03:23 pm by s2alexs2 Reason: 1
These are the picture of set up


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

This error is what happens when your computer isn't communicating with the Arduino.  It has nothing to do with whether your code is right or wrong.

The most common cause of this error (IMO) used to be people choosing the Duemilanove 128 when they had the newer Duemilanove 328.  Click on <Tools> -> <Board> and make sure you have the right board chosen, and try again.

You can also check to see if your using the correct COM port <Tools> -> <Serial Port>

Obviously, make sure your USB cable is plugged in, both to the computer and the Arduino.

Download the current drivers.

If it works, great.  If it doesn't, post again and let us know which Arduino and what OS you're using.

Good luck!


I have checked the version of Arduino
It says (Arduino Duemilanove) on the front and S 1681 on the back

So I believe it is TMega 168

Well I have tried the other one anyway

Also I checked the port from device manager, which is com 4 (I have set it to com4.

And I am using Vista-32.

It worked fine before..

but it is not working anymore...

At first it worked great then it started getting this problem.

Can anyone help me please


I got that same error code you did.  What worked for me was pressing the reset button on the arduino just before I clicked to upload my code onto it.

If that doesn't work, try doing a forum search for parts of that error message.  I believe I've seen other threads that talk about that too.

Hope this helps!
Cheers!  :)


I sorted the problem.

Just for those who still have the same problem I will post how I did it.

Well first off you have to disconnect all cables and pins.

Then close the programming progam and run it again (with cables connected)

If that does not work

Try changing your board. (when you do this you have to disconnect and re-run)

or check what port is adruino connected to.

if non of them works try compiling your program code

or press reset button as B_Free said.


Hi !
I have the same problem.
I'm using :

- Arduino diecimila
- Windows XP

I suddenly got the "avrdude : stk500_getsync():not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51"while programming with an accelerometer, and some sound variations on PWM.
Now I can't upload anything to my board, even after turning everything off, and disconnecting. The led on pin 13 blinks when reset, and blinks all the time if I try to upload something. I also checked the serial port on the computer, which name is under 10 (COM4), and works correctly. I tried on several computers, and it still the same.

Could you help me ?
Thank you !


It used to work and now doesn't?  May be a bootloader problem.  I don't know much about it, but if you search the boards you find a bit of info.


Aug 05, 2009, 12:13 pm Last Edit: Aug 05, 2009, 02:43 pm by Alice1 Reason: 1
Yes, it used to work. Now, I burned the bootloader and I got

"avrdude: verification error, first mismatch at byte 0x3800

        0x0c != 0xff

avrdude: verification error; content mismatch"
I couldn't reburn, I got things like "avrdude: AVR device not responding
avrdude: initialization failed, rc=-1", so I supposed the chip had died. Then I replaced the ATMega 168 by an AtMega8, and I got again the same message. Then I put a second AtMega8 and it worked.

Now I can keep working, with the atMega8, but I would really like to understand what happened.. Two dead microchips, it's a little bit hard ! :'(


Hehe, I got that once by being stupid and feeding 12V into a digital pin. Surprisingly, I only fried the chip and not the entire board.


Hi Alex _Park

you are missing the current limiting resistors between the output pins of the Arduino and the LEDs. Without them you will always blow your ATMega!

Use a resistor value of 1000 Ohm to protect your ATMega.



I get the same error when trying to upload, all of a sudden. Everything worked fine, no upgrades or updates done on the Arduino or software since last used. But I also get a different error message when trying to upload with my mac, "programmer not found"


I too have this same issue.

Arduino-0016 on Debian-Lenny(32bit) and windows xp.

Arduino Diecimila with the atmega-168

Code: [Select]
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x5


Figured it out. There's 2 options for the diecimila in 0016. One for atmega168 and one for the 328


Hey!! I had the same problem and I could fix it. ;)

I was testing a program with I2C and a 7 seg display, everything worked fine for a lot of times but sudenly the known problem "avrdude...." appeared when trying to upload an sketch. When I start up the arduino some blinks in the Comm. leds and then the Led in 13 began blinking very fast. After releasing the reset button the led-13 began blinking very fast inmediately. The last program loaded was not working.

Solution: Unplug the USB, press the Upload tool, just when the "Binary sketch size: xxx bytes (of ..." msg appears I connect the USB plug. The new program is loaded successfuly.

Good luck...

Go Up