6

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_paged_write(): (a) protocol error, expect=0x14, resp=0x11
avrdude: stk500_cmd(): programmer is out of sync

... when I run this command:

sudo avrdude -p t85 -c arduino -P /dev/ttyACM0 -b 19200 -U flash:w:src.hex\

Then I checked to see if the ATtiny was responding, I ran this command:

sudo avrdude -P /dev/ttyACM0 -p t85 -b 19200 -c avrisp -v

The results were successful.

EDIT:

Here are the time stamps (just in case):

15:24:29.502445729 E: 
15:24:29.623628385 E: avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85 
15:24:29.761744829 E: avrdude: AVR device initialized and ready to accept instructions 
15:24:29.766251405 E: 
15:24:29.812810614 E: Reading | ################################################## | 100% 0.05s 
15:24:29.821187588 E: 
15:24:29.825324777 E: avrdude: Device signature = 0x1e930b 
15:24:30.171341329 E: avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed 
15:24:30.180631410 E: To disable this feature, specify the -D option. 
15:24:30.334997131 E: avrdude: erasing chip 
15:24:30.495926604 E: avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85 
15:24:30.632387526 E: avrdude: reading input file "src.hex" 
15:24:30.637210000 E: avrdude: input file src.hex auto detected as Intel Hex 
15:24:30.641710226 E: avrdude: writing flash (98 bytes): 
15:24:30.645806835 E: 
15:24:30.712364458 E: Writing | 
15:24:30.718291473 E: avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x11 
15:24:30.752474103 E: avrdude: stk500_cmd(): programmer is out of sync 
15:24:30.827210626 I: Finished with exitcode 1

I can't seem to figure out what is wrong. Any suggestions?

user151324
  • 780
  • 3
  • 12
  • 21
  • Why do you keep changing the -c setting? – Chris Stratton May 02 '13 at 17:55
  • According to the programmers.txt file in the Arduino IDE, the -c setting should be “stk500v1”, although “arduino” is very similar. – microtherion May 02 '13 at 17:57
  • @ChrisStratton It doesn't matter if it's `arduino` or `avrisp`, they're the same thing. – user151324 May 02 '13 at 18:05
  • @microtherion I tried `stk500v1` instead of `arduino`, the same thing happened... – user151324 May 02 '13 at 18:08
  • I use the ISP sketch on an Uno without anti-reset components, -cstk500v1 and have no problem programm attiny85's though I'm also using -pattiny85 as the part identifier, using an avrdude config that came with an arduino installation (and specifying the path to that config with the -C option). – Chris Stratton May 02 '13 at 18:09
  • @ChrisStratton I tried it without any reset components, that didn't work either... – user151324 May 02 '13 at 18:21
  • Please post a picture of your setup. – jippie May 02 '13 at 18:26
  • Use the ArduinoISP version that is in the File => Examples => ArduinoISP – jippie May 02 '13 at 18:26
  • @jippie i did exactly that – user151324 May 02 '13 at 18:47
  • Are you entirely sure that your file is valid for a tiny 85? For example, it might try to put code at non-existent addresses. A hex file representing 98 bytes wouldn't be too long to include in your question. – Chris Stratton May 02 '13 at 19:56
  • Three more things you can try: (1) Enter the interactive mode of avrdude with the `-t` flag and try some flash writes from there. (2) add some more `-v` flags, so you can see the actual ISP commands issued. (3) Try my ScratchMonkey sketch http://microtherion.github.io/ScratchMonkey/, which is pin compatible with ArduinoISP, but uses the stk500v2 protocol instead. – microtherion May 02 '13 at 21:25

7 Answers7

1

I solved exactly the same problem by upgrading arduino IDE from 1.00 to 1.05 from http://code.google.com/p/arduino/downloads/list

This version of arduino IDE contains new version of ArduinoISP sketch.

binrush
  • 11
  • 1
1

I was getting this error with my Arduino Uno

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x11 

I had a protoshield connected and when I disconnected the protoshield everything started working fine.

EDIT

After some additional trouble shooting I found that it wasn't the protoshield, it was that the protoshield didn't have TX / RX marked for Digital PWM pins 0 & 1. Once I unplugged cables from 0(tx) & 1(rx) that resolved my issue.

Jacksonkr
  • 711
  • 2
  • 8
  • 16
0

I also had the problem: "avrdude: stk500_paged_load(): (a) protocol error, expect=0x14, resp=0x00. avrdude: stk500_cmd(): programmer is out of sync".

Later given up. Then I used another USB cable (proper) instead of a thin USB cable supplied with a Pololu ISP for something else and I realized the cable I used with the Arduino Nano may be of inferior quality. Changed the cable and - all my problems are solved!

Thys
  • 1
0

I had a long USB cable (10') connected to a powered 9-port usb hub.

Connecting directly to my mac fixed this issue immediately.

I've noticed that, depending on its mood, connecting directly to the machine can fix upload issues.

dethSwatch
  • 101
  • 1
0

In my case installing "AVR-GCC Toolchain" via Homebrew fixed all this issues.

All necessary details here: http://maxembedded.com/2015/06/setting-up-avr-gcc-toolchain-on-linux-and-mac-os-x/

olgv
  • 1
0

Disconnect all connections on your arduino board device, and try to upload the code to your arduino board. i solve this problem. There may be one of your problematic hardware, connected to your arduino board.

0

I also had the problem: "avrdude: stk500_paged_load(): (a) protocol error, expect=0x14, resp=0x00. avrdude: stk500_cmd(): programmer is out of sync".

Yeah.. Then I disconnected all the connections in Bluetooth ....after I compiled the program then I connected my Bluetooth to the Ardiuno uno.... Then I didn't get any error.