USB AVR Programmer -Part #1300

I have been unable to connect to my target AVR adapter after numerous attempts. I’ve reinstalled the software (AVR Studio & WINAVR) twice. It just says “failed to connect” using AVR Studio. My voltage on the target adapter and the power supply is 7.5 volts/600 ma. Is this an issue. I did adjust and change the config file a bit to allow this higher amperage. I am confident my drivers are installed properly as noted in your installation users guide and observations of my device manager. The amber LED flashes and the green renains solid. The green LED does flicker a bit when I try and connect. Any ideas? From my observations can it be said that nothing is amiss with the programmer and it may be my AVR adapter.

I assume you were able to open the “STK500 in ISP mode” dialog box, because AVR Studio never says “Failed to connect” at that step. I assume your error message came later, when attempting to program the flash or do some operation that involves actually talking to the target AVR.

The programmer’s red LED should be on after your first failed programming attempt. Once the red LED is on, please run the programmer’s configuration utility and read the message there that explains why it failed to enter programming mode.

-David

Actually I was not able to open the program into ISP mode. It just keeps saying that “connect failed” "Select AVR programmer"
I find no error messages either. Thanks for your help.

Are you using Windows XP?

If yes, then several customers have reported this same problem to us. The problem is with Microsoft’s usb-to-serial driver usbser.sys, and the solution has been to install Service Pack 3 from Microsoft.

Please let me know if this works for you!

-David

First I would like to thank you for your continuing support. Yes I have XP but also 3.5 installed. I even changed the file you refer to as a “Hotfix” for usbser.sys in your tutorial but it did not rectify the problem. I ensured that the connections were sound. There are “no errors” showing up on the config file as well.
Thanks

Where do you see the number 3.5? I think you might be confusing Microsoft’s .NET Framework 3.5 with Windows XP Service Pack 3. I don’t think there is a Windows XP Service Pack 3.5. There are instructions on the web for determining what XP service pack you have so please make sure you have service pack 3.

What file did you change, and how did you change it? If you get XP Service Pack 3, then you don’t need Hotfix KB918365.

Don’t worry about connections yet. You should be able to open the STK500 dialog box while the AVR programmer is completely disconnected from everything except USB.

As expected. There were no errors in the configuration utility because your computer has not commanded the programmer to do any programming yet.

-David

Confirmed that I have Service Pack3 as outlined in the how to. Yes, guess I had the 2 confused. As far as the hotfix I went to the Microsoft site where I requested they send me a fix even though it didn’t have the number quoted on your tutorial as being an old or bad file. They sent me a .zip file that once extracted automatically replaced the file. BTW what are you doing working on a Sunday.

So you had Service Pack 3, and you were having this exact same problem? Then you tried installing the Hotfix on top of that, and nothing changed?

Unfortunately, I think that installing the Hotfix could not have helped. The Hotfix predates Service Pack 3; the Hotfix installs version 5.1.2600.2930 of usbser.sys, while Service Pack 3 installs version 5.1.2600.5512. What version of usbser.sys do you have right now?

Do you have another computer you can try the programmer on?

-David

The version I have is 5.1.2600.5512. Looks like the .zip file from Microsoft did not replace the more resent version which I guess I had already. I really don’t have another computer to try it on.

Hello, steuny.

Can you try using avrdude? It comes with winavr, so you should already have it installed.

Try running the command below in a command prompt. The command below tells avrdude to erase the flash on a target mega168 (change the processor argument if you’re using a different processor).

avrdude -p m168 -P \\.\USBSER000 -c avrispv2 -e

If that doesn’t work, then try USBSER001, USBSER002, USBSER003, etc… I would stop at 010.

-David

Hi All,

I too have a 3pi robot with the m328p processor, and the Pololu PGM03A USB Adaper, running on XP SP3 with usbser.sys version 5.1.2600.5512 (xpsp.080413-2108). I have the latest AVR Studio with SP2. I get the same message. After pressing Connect on the connect dialog, it pauses briefly, then comes back with the title bar announcing: “Connect Failed - Select AVR Programmer”. I have tried both STK500, and AVRISP with Auto for the Com port. The specific com port choices only go up to COM9, but my hardware is on COM33. I don’t know if this is the problem or not…


I tried the suggested dvrdude command line software. It could successfully talk to the port, and return with success. I’m not sure what it really accomplished. Here is its output:

[quote]avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e950f
avrdude: erasing chip

avrdude: safemode: Fuses OK

avrdude done. Thank you.[/quote]
I know that the drivers and hardware actually work, because I can successfully upload programs to the 3pi, if I use Arduino’s IDE, and select COM33. First I had to carefully follow all of the online instructions for modifying the programmer.txt, boards.txt, and preferences.txt. I would really like to use the great sample projects for AVR Studio.

Thanks in advance for any ideas,
Bob

Hi Bob. That’s your problem. You need to change the COM port to be within COM1-COM9 or else it won’t work with AVR Studio. Please read this paragraph from the USB AVR Programmer’s user’s guide:

Thank you for giving me all the relevant information in your first post! By giving me all the information, you saved both of us a lot of time; instead of playing a game of “20 Questions” with you, I was able to diagnose your problem immediately. I wish all questions on this forum were that good.

-David

Hi David,

Thanks for your incredibly fast response. You had me up and running in minutes. I worked on trying several different things for a few hours. I checked the help file and the faq, but somehow I missed that point. I appreciate your awesome assistance.

Gratefully,
Bob