Yet Another Upload Problem

Hello, I'm new here and I'm also new to the arduino. I have got a Diecimila and try to get it running (without success until now) and cannot understand what is happening.

At first some information on what I have:

OS is WinXP-SP2 During Arduino software installation the USB driver wizzard did not start, as a USB driver was already installed because of another device (a scope). This is a FTDI-driver version 2.2.4.0 (somehow "newer" than the one in the Arduino-distribution.

I checked the version of the bootloader and after checking connection 13 of the Arduino board (instead of pin 13 of the ATMega168 :-D) I saw ONE blink indicating presence of the right bootloader.

I tried uploading etc. as well as Admin as with my normal, limited account.

Trying to upload a simple test sketch looks like this (avrdude command expanded and complation snipped):

... Binary sketch size: 1270 bytes (of a 14336 byte maximum)

C:\Dokumente und Einstellungen\Helmut\Eigene Dateien\kPapers&Tools\ \Elektronik\embedded\Arduino\arduino-0010\hardware/tools/avr/bin/avrdude \ -CC:\Dokumente und Einstellungen\Helmut\Eigene Dateien\kPapers&Tools\ \Elektronik\embedded\Arduino\arduino-0011\hardware/tools/avr/etc/avrdude.conf \ -v -v -v -v -pm168 \ -cstk500v1 \ -P\.\COM7 \ -b19200 \ -D \ -Uflash:w:C:\Dokumente und Einstellungen\Helmut\Eigene Dateien\kProjekte\ \kOpenRC\RCTE\rcte\applet\rcte.hex:i

avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

System wide configuration file is "C:\Dokumente und Einstellungen\ \Helmut\Eigene Dateien\kPapers&Tools\Elektronik\embedded\Arduino\ \arduino-0011\hardware/tools/avr/etc/avrdude.conf"

Using Port : \.\COM7 Using Programmer : stk500v1 Overriding Baud Rate : 19200 avrdude: ser_open(): setting dtr avrdude: Send: 0 [30] [20] avrdude: Send: 0 [30] [20] avrdude: Send: 0 [30] [20] avrdude: Recv: avrdude: stk500_getsync(): not in sync: resp=0xa2 avrdude: Send: Q [51] [20] avrdude: Recv: avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x08

avrdude done. Thank you.

As can be seen, avrdude obviously doesn't understand the Arduino bootloader. The bootloader source (ATmegaBOOT_168.c) shows, that commands "0 " and "Q " are simply ignored, but errors are counted because of the blanks.

The avrdude command contains a control "-cstk500v1" (and avrdude acknowledges this setting), what obviously means something different as the Arduino Diecimila. Is this control ignored? If yes: How does avrdude identify the Diecimila? If no: How could anybody before me upload anything into the diecimila? :-) I could not find a "programmer name" in avrdude's config file, which could "fit" to the Diecimila, but this file is very long and the search command of my editor couldn't help. Have I overseen something in the installation instructions?

OK, that's what I know, and it is not sufficient... :-(

Please can anybody help me out of this dead end? Thank you in advance, Helmut

P.S.: I thoroughly checked other threads but of course cannot be sure that this is not a repost.

You might want to try uninstalling the FTDI drivers you had and installing the latest ones from the Arduino software or the FTDI website. I think FTDI has a program for uninstalling their drivers on Windows.

The Diecimila bootloader and avrdude should be compatible.

Hello Mellis, thank you for your response.

I installed the latest driver from FTDI, it has the version number 2.4.6.0 (the drivers in the Arduino-distributions show version 2.0.0 in the .inf files).

The result was (as expected) the same.

Trying to hit some "correct time window" with resetting and starting the upload did also not help:

  • When avrdude (obviously) starts the upload later than 1sec after Arduino-Reset, the result is as described above. This is the "normal" case, as I always reset the device and then hit the upload button - this and the compilation takes (estimated) more than one second.
  • When the upload starts within this second (or maybe a bit earlier) the result is an infinite loop with regular short flashes of the Tx-LED. After 2..3 minutes I disconnect. The problems of beeing not synchronised and the protocol error is the same, but avrdude then messages an unexpected thread end because of the interruption.

I forgot to mention in my 1st post: Of course COM7 and Diecimila was always correctly selected in the tools menu.

Can please someone, who succeeds in uploading something to the Diecimila, switch the verbose mode on ("upload.verbose=true" in arduino's preferences.txt file) and compare the log with the one in my 1st post? Is "-cstk500v1" really correct?

Kind regards, Helmut

Yes, stk500v1 is correct.

Check the troubleshooting suggestions at: http://www.arduino.cc/en/Guide/Troubleshooting#upload

Hello mellis, again, thank you for your response.

I want to point out that I did work down the troubleshooting list - until I reached the line "If it still doesn't work, you can ask for help in the forum. Please include...".

The good news: Today it worked. The bad news: I don't know why. I didn't change anything, not one bit - honestly. I was inspired by trialex' answer in lyn89's question thread. Before I could try out different timings once more (what I had done several times before) it simply downloaded my test sketch - obviously using the auto-reset.

I'm afraid that the problem isn't "out of the world", as my current experience is: It works on thursday, but not on sunday, monday and tuesday. ;)

Now, when I have time again, I will try out the sketch...

Kind regards, Helmut

Hi,

I'm also new to the Arduino platform, and I have a similar problem that may shed some light on this one.

When I installed the IDE on my Macbook I didn't have any problems connecting to the Arduino, and programming wasn't an issue. However, when I installed the Windows IDE on my Dell mini-tower (Windows XP, SP2) I had exactly the same problem with one notable exception. The first time I uploaded a sketch everything went smoothly, but when I tried a second time I got the exact same error message.

After "fiddling" for a bit I found that by unplugging the USB cable, waiting for about 10 seconds and plugging the cable back in again I could - again - upload; but once only. Then it would freeze again, and I have to unplug the USB cable again, wait for XP to boot the driver, and re-connect the USB cable again.

I hope this experience helps a little with troubleshooting.

J.