Blinky LED Using an Attiny13, a USBTiny Programmer, and Olimex Board




This is a quick guide to show how to use the Olimex AVR-P8 board with an ATTiny13 and a USBTiny programmer.

The parts:

  • Olimex AVR board ($12 from SparkFun)
  • attiny13 ($2 from SparkFun)
  • Wall adapter (optional) ($6 from SparkFun)
  • USBTiny AVR programmer ($22 from Adafruit)
  • LED and ~1k resistor

First, insert the attiny13 into the socket on the Olimex board. The dot on the attiny should be on the same side as the socket notch.

Next, hook up the USB Tiny ISP to the ICSP header on the Olimex board. I found the silk screening on the Olimex board to be a little confusing, when trying to orient the USB Tiny connector. Take a look the first photo. It is not necessary to power the Olimex board at this point. The USB Tiny ISP will supply the power for programming, but the power jumper must be in place.

At this point, the host computer should be able to communicate with the attiny using the following command:

avrdude -p attiny13 -P usb -c usbtiny -n

You should see the device signature:

avrdude: Device signature = 0x1e9007

And assorted status.

Next, compile and a simple blink program (I found this one on the net and modified the makefile for the attiny13). Run the make command and if everything looks successful, "make install". (Both the source and makefile are attached).

Finally, hookup an LED and power. The attiny can be driven from the USB Tiny ISP, but this used all of the pin in the ICSP header, and I haven't added any components to the prototyping area, yet. So, I used a nine-volt wall power supply. And to be really kludgy, I used alligator clips to connect ground and pin 0 to my bread board. Noticed the silk screening on the Olimex board labels the holes for pin 0 (PB0), but this pin is not the neighboring pin in the ICSP header.




    • IoT Challenge

      IoT Challenge
    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest
    • Woodworking Contest

      Woodworking Contest

    3 Discussions


    10 years ago

    Hello, and welcome to the Instructables community! It's great that you've decided to tell the world about something you've made by publishing an Instructable. We just wanted to let you know that your project still needs a little more work if you want it to be well received on Instructables. Projects that don't include certain basic elements tend not to get the attention that they deserve, and so we'd love for you to check out the list below of what makes a successful Instructable. Successful projects on Instructables include: - clearly written details of a finished project with instruction - as many steps as are necessary to explain your project - clear images that you took of your project for most, if not all of your steps - an intro image - proper spelling and grammar - appropriate cautions or safety considerations I'll give you another opportunity to make any final changes to your project before we publish it. Once you're all set to go, please republish your project and send me a quick comment letting me know that you've made some changes. I'll give it a quick final check to make sure you're on the right path, and then remove this note. Thanks for your submission and we hope to see your project published soon!


    8 years ago on Introduction

    Please explain how do you compile the program and how do you transfer it to the microcontroller. Which commands do you type?
    Thanks for your guide!


    1 reply

    Reply 8 years ago on Introduction

    Assuming that you have the avr toolchain setup, the command to compile is simply "make" (which reads the makefile which is included with this instructable). To upload the resulting hex file to the avr, use "make install".

    Note, it is not necessary to do this as two separate instructions. "make install" will first recompile the program if it is out-of-date (i.e., if the the one-led-blinker.c file is older than the hex file).

    Also, setting up the tool chain is a bit beyond the scope of this instructable. It varies depending on your platform, etc. If you get really struck, just reply to this comment, and I'll try to lend a hand.