Comments: Tiny 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.

  • Member #19843 / about 8 years ago * / 2

    Two hopefully helpful things for newbies trying to work this for ATtiny84 14-legged chips bought on Sparkfun too:

    1. Installing by download unzip extract into YourArduinoHome/hardware/attiny-folder didn't work for me on Arduino 1.6 IDE. What worked was: (a) Preferences > Additional Boards Manager URLs, set to https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json, click OK. (b) Tools > Boards > Board Manager, scroll to bottom, select attiny by David A. Mellis, click Install. Now you can ( c ) select Board "ATtiny 24/44/84", Processor "ATtiny84" and Programmer "USBtinyISP. Cool a-b-c, cool cool cool.

    2. The modified Blink example uses

      int blinkPin = 0;

    because that's the one that's wired into the LED as a ATtiny85. If you're using the ATtiny84, then the pin that worked for me was the one called "Pin 6" in the specsheeet, I would say Leg-7. So just replace that instruction with

    int blinkPin = 6 
    

    and voilá. Using the built-in Sketch Examples, you can open it up and add this line above/outside the setup() function:

    int LED_BUILTIN = 6;
    

    Alright newbies, onward and upwards and forwards. happy Making, -M

  • Member #720641 / about 9 years ago / 2

    This tutorial fails to mention that in order to upload your sketch using the Arduino IDE, you will need to "burn bootloader" before setting the clock speed of the sketch to anything other than 1Mhz. For example, you plug your Tiny85 into the programmer and under "tools", set the board to "ATtiny", and set the "clock" to 8Mhz (internal), your sketch will not run as you would expect. Burning the bootloader first will allow you to select the 8Mhz clock speed for your sketch upload and be on time with the internal clock when desiring to run at 8Mhz.

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

    Pocket AVR Programmer vs Tiny AVR Programmer

    Overall, the Pocket AVR Programmer and the Tiny AVR Programmer have the same functionality. There are some slight differences. Here are some differences for the Tiny AVR programmer for a quick comparison:

    includes the DIP socket to easily plug in the ATtiny45 and ATtiny85
    does not use an ICSP programming cable
    there is no switch to turn on/off power to the target device
    

    ATtiny84 with the Tiny AVR Programmer?

    Yes, it is possible to use an ATtiny84 with the Tiny AVR Pogrammer and there are a few methods of programming the microcontroller.

    If you are using it with the Arduino IDE, you just need to select the correct board definition listed in the hookup guide [ https://learn.sparkfun.com/tutorials/tiny-avr-programmer-hookup-guide/programming-in-arduino ]. I recommend selecting the internal 1MHz or 8 Mhz clock after installing the board definitions. Selecting the external will brick the microcontroller unless you have a external oscillator set to that frequency. You will also need to connect the ICSP pins from the Tiny AVR Programmer to the ATtiny84's pin.

    Here’s another example to upload using a programmer that might be of some use [ https://learn.sparkfun.com/tutorials/pocket-avr-programmer-hookup-guide#programming-via-arduino ]. It shows how to connect the ICSP pins between the Pocket AVR Programer and the ICSP pins of the ATmega328P on the RedBoard programmed with Arduino. You would need to look at the pinouts from the Tiny AVR Programmer's Eagle files to determine the correct ICSP pins. Looking online, there were examples of using the AVR Pocket Programmer with an ATtiny84. Here’s one example => http://electronut.in/getting-started-with-the-atmel-attiny84-microcontroller/ . You can check out the ATiny84's pinouts in the tutorial.

    While harder, you can also use a command line prompt to flash instead of the Arduino IDE because there is an option with AVRDUDE [ http://www.nongnu.org/avrdude/user-manual/avrdude_4.html#Option-Descriptions ]. Here’s an example of uploading code through a command line [ https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader#uploading-code---hard-way ]. You would just need a compiled compiled .hex file and change a few command line options (i.e. microcontroller, fuse bits) for the ATtiny84. You will lock the fuse bits just the tutorial.

    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 you 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 (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.

    Access to LilyTiny and LilyTwinkle ICSP Pins

    Tutorial on using this programmer with the ISP Pogo Adapter https://www.sparkfun.com/products/11591 to reprogram your LilyTiny and LilyTwinkles with ease => http://32b.it/programming-a-lilytiny-or-lilytwinkle/. =)

    avrdude Error

    If you see this error, it could be due to a few reasons. This error usually means that the programmer is OK but it could not find the chip:

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

    1.) Disconnect Any Devices Connected to ATtiny

    Note that you might have to disconnect the components before you can upload a new program to the microcontroller.

    2.) USB3.0 and Macs

    There have been issues with using some of our boards with USB 3.0. Try testing on a different computer. In some instances, customers were able to get it working on a USB 2.0 Hub when the device was not working with a USB 3.0 port. Looking online, other customers had issues on their Mac with a generic AVR Programmer. Using a USB2 hub fixed the issues with the USBtinyISP programmer. It's possible that USB3.0 is too fast for the AVR Programmer which was designed when computers were using USB2.0.

    3.) Pin Connections

    Make sure that the connections are good and correct.

    4.) Power

    Try checking to see if the microcontroller has sufficient power.

    5.) Crystal Oscillator

    If the microcontroller requires an oscillator, make sure that it has the correct external crystal oscillator connected.

    Additional Tech Support Tips/Troubleshooting/Common Issues

    https://learn.sparkfun.com/tutorials/pocket-avr-programmer-hookup-guide/discuss#comment-564ba50bce395f75158b4567

  • MetabolicCloth / about 10 years ago / 2

    I cannot get this to work with the latest Arduino IDE 1.6.1

  • Member #1615460 / about 11 months ago * / 1

    It's a shame the installation tutorial is so out of date. Also the recommended boards file only works on very old versions of Arduino IDE. Not a good look. A shame because I really like this product. Connectors for developing, plugging in new chips. It's perfect. I ended up using ATTinyCore. Installing with: http://drazzy.com/package_drazzy.com_index.json Had a slight snag with this. https certificate was expired. But you can still download the json file with your browser and the add it to: File > Preferences > Additional Boards Manager URLs using file://home/username/Downloads/drazzy.json. Install ATTinyCore in the boards manager. And then select it in the Tools > Board menu. Don't forget to set the programmer: Tools > Programmer > USBTinyISP(ATTinyCore) Will not upload using the toolbar button. WIth the message: A programmer is required to upload. Use the menu: Sketch > Upload using programmer.

  • Member #1484155 / about 6 years ago / 1

    For those having issues uploading sketch with Arduino. I went through all the proposed driver solutions with no success until I found this blog which suggest to make a backup of the "preferences.txt" file ( usually located in c:\Users\xxyou_Userxx\AppData\Local\arduino15\ ) After changing the name to "preferences.txt.bak" you restart Arduino (make sure your driver is properly installed and the TinyProgrammer is pluggeds in) Arduino will rebuild a "preferences.txt" file . See the rest of the short tutorial here: https://github.com/arduino/Arduino/issues/8052 Look for [ per1234 commented on Oct 4, 2018 ] Thank you per1234 you corrected my upload problem in a blink. Hope this help Cheers

  • Member #373443 / about 6 years ago / 1

    Looks like the Arduino IDE 1.6.xx menu for Boards does not match the images that are shown in the hookup guide (1.6.xx screenshot image). The guide shows the IDE 1.0.xx menu setup, which is helpful for those using that version, but wondering if it might be helpful to show the newer IDE version too.

  • Member #902952 / about 8 years ago / 1

    On Mac Arduino 1.8.1 it doesn't recognize the Tiny AVR Programmer - I can't see it in the port - I've tried also on an older Mac with USB2 and still no results

    • Member #902952 / about 8 years ago / 1

      Mac

      So it was just that the PORT was not updated. There is no PORT. just ignore it and even though you don't see the port press on Upload - it will work

  • Member #489794 / about 8 years ago * / 1

    I ended up in a Somewhat Unhappy Place in my project. Originally, I designed it for a Tiny85. Alas, the AtTiny85 was just a wee bit too tiny. To get enough Flash, SRAM, and EEPROM, I had to graduate to a Tiny167.

    This had an unhappy downside: the chip is physically larger, but the form factor for where the board goes is not negotiable. x,y and z are severely constrained. So I had to lose the USB connector. How am I going to program it? Well, I still have this TinyAVR programmer, let's put it to good use. Six-pin header? Oh no. Not a chance. Besides taking up more space than the USB connector, I don't have the vertical space to put one in.

    Ok, consider the Lily tiny board. Six pins on the underside to program it, for example, by soldering pogo pins into the TinyAVR six-pin-header. No, won't work. Arranging that six-pin space not only requires physical space, but the impact on trace routing is a Total Disaster. We looked at the magnitude of this disaster. Turns out, the disaster is so bad that we could ask FEMA for assistance This leads to my next problem set: how do I Run without a bootloader? Somebody has to transfer control from the reset vector to main()?

    void main()
    {
      setup();
      while (true)
          loop();
      }
    

    Ok, yes, this in an oversimplification, but it's good enough to illustrate my point. What (if anything) do I have to do to get my sketch to work?

    The Tiny85 is too tiny in other aspects. Turns out that I need to use close to 100% of the Flash for my sketch. So burning the bootloader is no longer an option.

    The current plan is to build a five-pin board with pogo pins that mate with the Tiny167 SOIC20 pins. A jig to hold the programmer in alignment with the mainboard (Vcc will not be connected, because I have several 3.3V-only sensors I do not wish to fry. The unit is battery-powered using a CR2032), and viola (as we used to say, in the string section), a downloadable bare '167, nary a bootloader nor ISP header in sight.

    So, what, if any, magic will allow me to achieve this? joe

  • Member #454903 / about 8 years ago / 1

    Ran into something rather strange. I'm using the Attiny85 to run a motor control chip but couldn't figure out why pin 0 wasn't working. Changed to pin 1 and 2 and it works OK. Changed back to pin 0 and 1, programmed it and took the chip out of the programmer and it works fine. So I assume it has something to do with the LED on the programmer but I would think it is small enough current that it shouldn't be a problem. Anyone else have this problem?

  • Member #725382 / about 8 years ago / 1

    So I got this working fine and have successfully uploaded and run several programs all at 8mHz. The chip is the ATTiny85-20PU which should be able to run at 20mHz. The Arduino tools menu only has clock selections for 1mhz and 8mHz internal, but 16 and 20 for external. Can I run this at 20mHz without an external clock? If so, do I select the 20mHz external selection and make some change somewhere?

    thanks in advance,

    mike

    btw... love this AVR programmer. It's sooooo nice not to have to go through the Uno or other methods.

  • Member #454855 / about 9 years ago * / 1

    This doesnt work, i get the following error:

    Sketch uses 840 bytes (10%) of program storage space. Maximum is 8,192 bytes. Global variables use 11 bytes of dynamic memory. avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check.

    this is with the attinny connected to the avr programmer and arduino setup with attiny 85- 1mhz internal on com1.

    no other hardware is connected to the micro and i installed the verified drivers.

    hope you can help, thanks

  • Member #768127 / about 9 years ago / 1

    Hi, I wanted to know if this programmer would work Atmel Studio.

    • Member #1012532 / about 8 years ago / 1

      I also don't use Arduino but would like to use AtmelStudio 7 with this Tiny AVR Programmer. Did you find a way or can a moderator please comment on this? Thanks.

  • Permie / about 10 years ago / 1

    Still having a problem loading the driver. I pointed to the 64-bit driver and waited (BTW, your link to the waiting game goes to a video that has been taken down due to copyright)

    Windows (7) comes back and says it can't load the driver because it's not signed. Even though I said load it anyway. I logged in as admin and it did the same thing. The LibUSB-Win32Devices/USBtinyISP aVR Programmer still has the yellow exclamation mark.

  • Member #404776 / about 10 years ago / 1

    As noted here you can also use the pin marked A2 (PB4, leg 3) as PWM.

  • D___Run___ / about 11 years ago / 1

    should include a pointer to windows 8 driver signature disable tutorial.

    • jimblom / about 11 years ago / 1

      Good call! I added a note to the top of the driver install page.

  • mellis / about 11 years ago * / 1

    One correction to the jumpers discussion on the "Board Overview" page: the VCC jumper only effects the VCC pin on the unmounted 6-pin (2x3) ISP header. The ATtiny always receives power from the board's USB connection, regardless of whether the VCC solder jumper is open or closed.

    Or, at least, that's the situation on the version of the board that's currently for sale. It looks like this tutorial is written for a newer, still un-released version, which may have a different behavior for the VCC solder jumper.

    • jimblom / about 11 years ago / 2

      Thanks! Got that tidied up. (It should still be the case for the upcoming revision as well.)


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