Electronic – arduino – avrdude error – stk500_getsync(): not in sync: resp=0xff

arduinoattinyavravrdudeprogrammer

I am using my Arduino Uno as a programmer to program my ATtiny85. I uploaded the ArduinoISP sketch to my Uno. I double checked my wiring, did some googling, but I still can't figure out why I get this error:

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

when I run this command:

sudo avrdude -p t85 -c avrisp -P /dev/ttyACM0 -b 9600 -U flash:w:src.hex

Any suggestions? Thanks!

Best Answer

You have requested 9600 baud serial communication, which is probably not correct for your ISP sketch.

I believe by default that it is now 19200, but you can tell for sure by finding the initialization line in your ISP sketch, such as

void setup() {
  Serial.begin(19200);

The -b parameter to avrdude specifies the baud rate for communication with the programmer.

In contrast -B paramater specifies the speed of the actual programming, though I'm not entirely convinced that this is honored when using the ISP sketch.