1

I'm using avrdude to program my Arduino. My Ardunio Uno is from China and the programmer reported in the device manager is ch340.

When I first connect the arduino to my computer, avrdude works one time. All subsequent times it fails unless I unplug it from the computer and plug it back in. I tried putting a 10uF capacitor from RST to GND, it didn't help. I also tried a different configuration:

programmer
  id = "ch340";
  desc = "ttl port banging, reset=!txd sck=!rts mosi=!dtr miso=!cts (invert signals using 74ls04)";
  type = serbb;
  reset = 3;
  sck = 4;
  mosi = 8;
  miso = 7;
;

That also didn't help. With either of those solutions, I couldn't even get it to work the first time. Only with programmer "arduino" did I get it to work, but then only once.

Here is the output from the first run after connecting to USB:

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

All runs after that:

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

avrdude done.  Thank you.

I also tried the reset button the board, it didn't make a difference.

Eyal
  • 5,728
  • 7
  • 43
  • 70

1 Answers1

0

It appears to have been my version of avrdude. The one included with an avrgui that I downloaded is 5.6. The one on the arduino website is 6.0.1 and it works.

Eyal
  • 5,728
  • 7
  • 43
  • 70