Pocket AVR Programmer Hookup Guide

Pages
Contributors: jimblom, bboyho
Favorited Favorite 10

Troubleshooting

Below are a few troubleshooting tips for resolving some of the AVRDUDE errors that you may run into.


AVRDUDE Not Recognized

If you are having issues getting a response from AVRDUDE, you may receive the following error. It's probably due to certain environmental variables or your computer settings preventing you from properly using AVRDUDE.

language:bash
'avrdude' is not recognized as an internal or external command, operable program or batch file

The error output in the command line may look similar to the screenshot below.

AVRDUDE Commands not Recognized

One solution may be to try following the instructions provided by AVRDUDE to install it for your OS. For Windows, you could automatically install WinAVR 20100110 as explained briefly on page 35 of the AVRDUDE documents v6.3.

AVRDUDE Documents v6.3 (PDF)

Otherwise, you can move to the Arduino IDE program folder where avrdude.exe is located. Try doing a search within the Arduino program folder to determine the path. Then navigate to the location where it is located using the cd.. and cd commands. In this case, Arduino IDE v1.8.5 was installed and located in the Program Files folder of my C:\ drive under ...\program files\arduino-1.8.5\hardware\tools\avr\bin. Type in the change directory commands to navigate to the proper location in the command line. From the screenshot of the error, I needed to move up the directory by using the following command.

language:bash
cd..

Then I needed to move into the Arduino's program folder that is located in the C:\ drive.

language:bash
cd programfiles\arduino1.8.5\hardware\tools\avr\bin

Your command line should look similar to the image below.

Changing Directories in the Command Line for Windows

Once you are in the proper working directory, type in avrdude again. You should see an output similar to the image below.

AVRDUDE Responding when in the Proper Working Directory


Configuration File Not Found

If you are having trouble reading the AVR device signature to verify the device using the command avrdude -c usbtiny -p atmega328P; and you receive this error:

language:bash
         System wide configuration file is ""
avrdude: can't open config file "": Invalid argument
avrdude: error reading system wide configuration file ""

It's probably due to the way AVRDUDE was installed on a computer. In this case, AVRDUDE could not find the location of the avrdude.conf file. This is probably due to environmental variables or your computer settings preventing you from properly using AVRDUDE. If you remember from the earlier troubleshooting tip, AVRDUDE was located in the Arduino IDE program folder. While the working directory was correct, the avrdude.conf file was in a different folder as you can see from the image below on a Windows OS.

AVRDUDE Configuration File

The easiest solution would be to adjust the environmental settings by automatically installing it for your OS as explained in the avrdude-docs (v6.3). For Windows, you could install WinAVR 20100110 as explained briefly on page 35 of the AVRDUDE documents v6.3.

Otherwise, you could use the -C command and provide the path in quotes ("...\avrdude.conf") where the avrdude.conf file is located. For the Arduino IDE v1.8.5, it was located in ...arduino-1.8.5\hardware\tools\avr\etc directory. Assuming that you have AVRDUDE in the working directory, the command should like similar to command below to read an ATmega328P.

language:bash
avrdude -C "C:\Program Files\arduino-1.8.5\hardware\tools\avr\etc\avrdude.conf" -c usbtiny -p atmega328p

A successful device signature read with the configuration file should look similar to the output below.

Successful AVRDUDE Device Signature Read in the Command Line with an the Location of the Configuration File


Driver Related Issues

If you run AVRDUDE commands and receive this error below, the issue may be related to the drivers for the AVR Programmer whose device ID is 0x1781/0xc9f. Either the drivers are not installed or there is a driver conflict.

language:bash
avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)

Drivers Not Installed

One solution is to ensure that the drivers are installed as explained earlier. You may also want to try another USB cable or unplugging/replugging the AVR programmer back into your COM port. The error output in the command line may look similar to the screenshot below.

AVR Programmer Drivers Not Installed

Driver Conflicts

If you have installed the correct drivers as explained earlier, it's possible that there is a driver conflict. You'll receive the same error but the solution may not be as intuitive as you may think. The output in the screenshot below occurred when using the Tiny AVR Programmer to verify an ATtiny85's device signature. The drivers were installed correctly and had been working with the Pocket AVR Programmer. However, the Tiny AVR Programmer was still not recognized.

AVR Programmer DRivers Not Installed

Opening up the device manager, the Tiny AVR Programmer showed up as a different driver (i.e. FabISP) and name as shown below.

AVR Programmer Driver Conflict

The solution was to right click and delete the driver. Simply right click the COM port that it enumerated on and select "Uninstall device".

Right Click Device to Uninstall Device

You may see a window pop up similar to the image below. Click on the button labeled Uninstall. In some cases, Windows may provide an option to "Delete the driver software for this device." if the option is provided, simply mark the checkbox before clicking on the button to uninstall.

Uninstall Device

After uninstalling, power cycle the programmer by unplugging/replugging the Tiny AVR Programmer from the USB port. Head back to the Installing Drivers section and follow the instructions to Automatically Install the Drivers using Zadig.

Installing Drivers: Automatically Install the Drivers with Zadig


Error Connecting To AVR Programmer

If you receive an error similar to the output below, it is probably due to the connection to the AVR programmer.

language:bash
avrdude: error: usbtiny_transmit:
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override this check.


avrdude:error: usbtiny_transmit:

One solution is to try to unplug and replug the AVR programmer back to your COM port. You may also want to check the USB cable or ensure that the drivers are installed correctly. The output in the command line may look similar to the screenshot below.

AVRDUDE usbtiny_transmit Error Communicating with AVR Programmer