Pages: [1] 2 3   Go Down
Author Topic: avrdude: stk500_getsync(): not in sync: resp=0x00  (Read 147292 times)
0 Members and 2 Guests are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 1
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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++)
    pinMode(output[i],OUTPUT);
  pinMode(input,INPUT);
}

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

    else
    {
      x = 0;
      y = 1;
        state == HIGH;
    }
  }
  while(1){
        digitalWrite(output[x],HIGH);
        delay(100);
        digitalWrite(output[x],LOW);
        x += y;
        z++;
        if(z == n){
           z = 0;
           break;
        }
  }
  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.
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

These are the picture of set up



« Last Edit: July 25, 2009, 08:23:28 am by s2alexs2 » Logged

0
Offline Offline
Full Member
***
Karma: 1
Posts: 170
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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!
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Tucson, AZ
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Total Newbie
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!  smiley
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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

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 !
Logged

0
Offline Offline
Full Member
***
Karma: 1
Posts: 170
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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

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 ! :'(
« Last Edit: August 05, 2009, 07:43:41 am by Alice1 » Logged

PracticalMaker.com
Offline Offline
Jr. Member
**
Karma: 0
Posts: 68
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 185
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

MikeT
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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"
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 55
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I too have this same issue.

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

Arduino Diecimila with the atmega-168

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

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 55
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey!! I had the same problem and I could fix it. smiley-wink

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...
Logged

Pages: [1] 2 3   Go Up
Jump to: