avrdude not work in cmd

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi!!
I don't undestand why I can program my 328P of my arduino board with de arduino IDE, but I can't do this with avrdude at cmd.

avrdude -p m328P -P com3 -c arduino -b 19200 -U flash:w:LedBlink.hex

The response is:

avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done. Thank you

I read a lot of threads and tutorials and I think I'm writing correctly the commands.
What's the problem?

Arduino duemilanove, IDE: arduino alpha 0021

Thanks!! :D

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your command looks absolutely fine.

Are you sure that the Arduino is on COM3.
Are you sure that your Duemilanove's bootloader runs at 19200 baud. My Seeeduino 328 runs at 57600 baud.

The older Arduinos with mega168's or mega88's ran at 19200 baud.

If you use your Duemilanove as an ArduinoISP, you will probably change it something faster than its 19200 default.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Are you sure that the Arduino is on COM3.

Yes, I'm sure. It's the same port COM that uses the Arduino board.

Quote:

Are you sure that your Duemilanove's bootloader runs at 19200 baud

To be honest, I'm not sure, but I checked the arduino preferences and the serial rate seems to be 19200 baud:
serial.debug_rate=19200

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Are you sure that your Duemilanove's bootloader runs at 19200 baud.

Hi all,

first ever post (reply) here...

I did the self same thing myself last night :) Albeit on Eclipse/AVRcrosspack on OS X etc...)

Nope, it's not 19200 it is 57600!

--greg
Still learning, don't shout at me, educate me.
Starting the fire is easy; the hardest part is learning how to keep the flame!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Nope, it's not 19200 it is 57600!

Yes you're right grefsmithcts. I've tried with 57600 baud and it works.

So, I can't understand why the serial rate at the preferences of the Arduino IDE is 19200 baud and it works perfectly

Thank very much!!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
So, I can't understand why the serial rate at the preferences of the Arduino IDE is 19200 baud and it works perfectly

It's because the Arduino IDE serial speed is for *you* to communicate with the Ardy,whilst the uploader/bootloader speed is coded into the IDE specially for the bootloader and is not really connected with anything you see in the IDE. Confused me for a while as well :oops:

--greg
Still learning, don't shout at me, educate me.
Starting the fire is easy; the hardest part is learning how to keep the flame!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Aha!!
OK!! Now I understand it better.
Thanks!!
It's really helpfull to have such a good forum where I can find answers.

Another question sprang to my mind:
Whith the RX an TX pins I can reach the 57600 baud?? I read at the arduino website that the maximun speed was 9600 baud to comunicate via serial.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I read at the arduino website that the maximun speed was 9600 baud to comunicate via serial.

Post the link - they are simply wrong. The 168 Arduino has a 16MHz crystal - all common baud rates up to 115,200 are in the 2% error range. (though the latter will require you to use U2X=1)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can do 57600 baud with a 16MHz Arduino. It is possible to achieve 115200 baud too, but I forget if this comes with Serial.begin().

Life in general (with humans) works fine at 9600 baud.
Life with other machines might just as well go faster.

Of course you youngsters can probably read a Terminal at supersonic speeds.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm sorry!!
I was wrong. I saw 9600 baud in an example at the arduino website, not that the maximum speed was 9600 baud.
I'm sorry, from now on I'm gonna read twice or three times the data before talk.

Sorry again!