[SOLVED] USB AVR Programmer won't talk to avrdude, config

Just purchased this device, and can’t seem to get it to work.

All the lights seem to do the proper things, but avrdude fails thus:

~ $ avrdude -pm168 -cavrispv2 -P/dev/ttyACM0 -e

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude done.  Thank you.

and the windows configuration utility refuses to start, erroring with “This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.” I have checked that I am using windows xp sp3.

I tried in win2k as well but the drivers blue-screened it.

What’s next? why does this device ship in a configuration such that it can’t be used straight away?

The other port this device provides gives me:

~ $ avrdude -pm168 -cavrispv2 -P/dev/ttyACM1 -e
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: stk500_2_ReceiveMessage(): timeout

Are you using Linux?

What are you trying to program?

The avrdude error you are getting is probably caused by an incorrect connection to the ATmega168 or a lack of power. Make sure your target board is turned on.

Is the yellow LED of the programmer on before you attempt programming?

Does the red LED come on after you attempt programming?

If you are using Linux, you can download the Pololu USB Software Development Kit, compile PgmCmd, and run “PgmCmd.sh -s” after attempting to program when the red LED is on; this will give you a better error message from the programmer.

Under Windows, do you have the .NET framework installed? The programmer’s configuration utility (pgm03a_config.exe) requires the .NET framework to be installed. If you install the SLO-scope client (by runnig sloscope_installer.bat) that should take care of installing .NET for you, or you can download it from Microsoft.


Also: /dev/ttyACM1 is the TTL serial port, so avrdude won’t get a meaningful response form it. The programmer does not support Windows 2000.


I was trying to read the flash of my arduino diecimila (atmega168@16MHz). it was powered at the time. red flashes before connection, yellow led was on before programming, and red was on with yellow flashing afterwards. I will try the sdk and NET framework to see what’s going on.

One more thing to beware of: the Arduino Diecimila doesn’t have a keyed connector so you might have plugged the programming cable in the wrong the way.


david, I was careful to plug the connector in such a way that the red wire aligned with the pin marked 1.

installing NET framework allowed me to run the config, which told me that the vdd voltage was dropping to 4.32v, below the threshold. I increased the thresholds and all works now. Why is my usb port dropping to 4.3v? who knows, everything seems to work fine despite…

Since most atmegas happily run down to 3.3v or less, why not use that as a minimum shipped threshold?

For others reading this thread, my cabling orientation was correct - pin 1 is red wire on the IDC cable.

Okay, great. I’m glad you were able to figure out what the problem was with the help of the configuration utility.

One of the tasks on my list is to make an actual installer for the programmer which will make it easier to get started in Windows.


personally I’d much prefer a cross-platform console utility with whichever gui frontend you like… I have a winxp virtual machine for situations like this, but I’d prefer to not use it.


The programmer is really intended for use with AVRs running at or near 5V; it will not work with 3.3V devices. Also, AVRs become speed-restricted below 4.5V, so one cannot assume that 3.3V is indicative of a safe programming voltage without first knowing the target’s clock speed. AVRs that are programmed while unpowered or underpowered can become permanently corrupted, which is why the programmer pays such close attention to the target power as it programs. The programmer’s default settings are intended for maximum safety, though the user can relax the safety restrictions if he chooses.

- Ben

You probably won’t need to run the configuration utility very often now that you’ve gotten the programmer working. But if you do need it, we recently released a cross-platform console utility for the programmer. It’s called PgmCmd, it works under Linux, and it’s available in the Pololu USB Software Development Kit, so you don’t need to use Windows XP if you don’t want to.

The SLO-scope features are not supported in Linux yet, but that’s another thing that I’m hoping to do soon.