Comments: Pocket AVR Programmer Hookup Guide

Pages

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • -------------------- Tech Support Tips/Troubleshooting/Common Issues --------------------

    Installing Pocket AVR Programmer Driver with Windows 8

    If you are using Windows 8, they would need to disable the driver enforcement => https://learn.sparkfun.com/tutorials/disabling-driver-signature-on-windows-8 . The tutorial talks about it.

    Alternative Pocket/Tiny AVR Programmer Driver Installation with Signed Drivers

    An easier method is to point your computer to a driver package that has all of the drivers that are digitally signed. Codebender has packaged a nice digitally signed installer that gets us through all of this headache. Brian (from SFE Education) tried this on his Windows without the need to disable drivers and download their specific driver file. Go through Codebender's getting started walkthrough [ https://codebender.cc/static/walkthrough/page/1 ] to install the drivers in step 3.

    Driver issues in Windows 10

    If you've followed the installation instructions, and the board still isn't being recognized, try using the drivers in our Github repository, here https://github.com/sparkfun/Pocket_AVR_Programmer/tree/master/Drivers.

    Flashing an Atmega328P Microcontroller

    I was able to read the flashed contents of an ATmega328P in the the" Flash Reading" section of this tutorial https://learn.sparkfun.com/tutorials/pocket-avr-programmer-hookup-guide/using-avrdude. To flash the contents onto another Atmega328P, you would just set the fuse bits, write the saved .hex flie to the target Atmega328P, and set the lock bits. This is similar to what is explained in the tutorial for installing an Arduino bootloader => https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader#uploading-code---hard-way .

    avrdude Errors

    1.) If you are seeing this error:

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

    it is due to a a few reasons.

    I recommend checking pin connections. There might be the reset pin that is not connected sufficiently (I had problems when reprogramming an ATtiny with the reset and pin not connecting correctly). You need to to disconnect components attached to microcontroller before you can upload a new program to the chip. This is explained with the ATtiny's in this tutorial => http://highlowtech.org/?p=1801 )

    This error usually means that the programmer is OK but it could not find the chip. Check the wiring connections and see if your target AVR microcontroller is powered.

    Also, make sure that you power your target AVR microcontroller. Normal AVR programmers don't have this option. Luckily, the AVR programmer is able to power your target by flipping the switch to the silkscreen that says "Power Target."

    2.) Using a USB hub cable with the programmer, it might not work properly if the cable is damaged. You might get this error:

    Could not find USB device 0x1781/0xc9f
    

    Try using a dedicated mini-B USB cable or a different USB cable to prevent this error.

    3.) If you are getting an error in the Arduino IDE similar to this with the Pocket AVR Programmer:

    avrdude: verification error, first mismatch at byte 0x0000
    0x0c != 0x00
    avrdude: verification error; content mismatch
    

    Try looking at this tutorial => http://www.xuan-wu.com/2012-11-19-Arudino-Uno-Bootloader.

    I never fully understood this particular Arduino error output. I think it has something to do with either the fuse bits or lock bits when the programmer is trying to verify the bits in Arduino's board definitions. It could also be the write speed to the microcontroller's flash memory or something with the RESET pin being triggered when your computer is trying to open the COM port to the Arduino development board as explained in the tutorial.

    4.) If you are seeing this error with the byte location varying on each attempt when flashing code:

    avrdude: verification error, first mismatch at byte 0x0080
    0x80 != 0x58
    avrdude: verification error; content mismatch
    

    It has something to do with the bitclock rate used by the programmer. A customer had a similar issue and found it through some of the resources that I had provided him. Most likely the original bitclock setting was too fast for the chip which would cause a failure to write/read the chip's memory correctly. Just open a command line interface and specify the -B50 in the avrdude command line in order to slow down the bitclock rate in the programmer (sck) to 50 microseconds.

    Programming via Arduino with a modified avrdude.conf

    Certain Arduino IDE's like v1.0.1 have the avrdude's command line hardcoded so it cannot be "changed." You can view this by using the IDE into verbose mode. To modify the "hardcoded" avrdude used with the Arduino IDE, go to your avrdude.conf file and modify the bitclock rate variable. The customer that resolved his case by using http://www.nongnu.org/avrdude/user-manual/avrdude_11.html#AVRDUDE-Defaults to change the"default_bitclock" at line 319 of the avrdude.conf for his ATtiny85:

    default_bitclock = 50;
    

    The customer was able to compile the Blink.ino sketch file through the Arduino IDE in order to upload code to the Attiny85. There were no verification errors. By changing the bitclock rate, this would naturally cause the code to upload noticeably more slowly.

    5.) If the Pocket AVR Programmer was working initially on a previous Windows OS and you updated to a Windows 10 64-bit OS, there might be some file paths that are broken. You might see this error in the command line when trying to read your AVR microcontroller:

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

    If you see this error, try reinstalling WINAVR on your computer => [ https://sourceforge.net/projects/winavr/files/WinAVR/20100110/ ].

    Make sure to also re-install the drivers as explained in the tutorial for your Windows 10 OS. When installing the libusb-win32 drivers with Zadig, you can edit the name of the device by selecting the edit box and renaming the “Unknown Device #1” as “USBtiny”. The device will show up like the tutorial as LibUSB-Win32 Devices>USBtiny after the drivers have been installed.

    ATmel Studio and AVRDUDE

    The latest Atmel Studio supports AVRDUDE. For more information on using Atmel Studio with the Pocket AVR Programmer, try looking at these tutorials:

    How to integrate AVRdude with Atmel Studio [ https://asensar.com/blog/2013/how-to-integrate-avrdude-with-atmel-studio/ ]

    Get the USBTiny Working with Atmel Studio [ http://www.crash-bang.com/using-usbtiny-with-atmelstudio/ ]

    **Additional Troubleshooting Tips with the Pocket AVR Programmer & Installing an Arduino Bootloader **

    https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader/discuss#comment-5579f0edce395f184c8b4567

  • Member #738154 / about 9 years ago / 1

    I have a question here. So it says in the guide that the board option on the Arduino IDE has to be selected but I can't find the AVR that I'm programming. I'm using an ATtiny 85. Any help would be appreciated!

    • M-Short / about 9 years ago / 2

      The Arduino IDE does not natively support the ATTiny chips so you will need to add that information to the IDE. Check out how to install the add-on here.

  • Alternative Pocket/Tiny AVR Programmer Driver Installation with Signed Drivers

    Brian from our education department found this with Codebender. There is a driver package that has all of the drivers that are digitally signed so they don't have to go through the steps of disabling their driver enforcement. Codebender has packaged a nice digitally signed installer that gets us through all of this headache. Brian tried this on his Windows with the Tiny AVR Programmer => http://codebender.cc/drivers/windows-driver-installer.zip without the need to disable drivers and download their specific driver file.

    • tzikis / about 9 years ago * / 2

      This is Vasilis, the CEO of codebender. Thanks for the mention, bboyho! :)

      I'd like to mention that, instead of simply adding the driver, we really do suggest going through our Getting Started Walkthrough altogether, which makes sure everything is properly set up on your computer in order to use Arduino boards (and ISP Programmers). Here's the link: https://codebender.cc/static/walkthrough/page/1

      And also, you can use the ISP programmer to program any Arduino straight from your browser (Chrome or Firefox), and even burn a new bootloader, from this page: https://codebender.cc/static/burn_bootloader

      Oh, and feel free to add this in the tutorial ;)


If you've found an issue with this tutorial content, please send us your feedback!