AVR Studio 5 and usbTinyISP

December 2, 2011

I have been working with some small AVR chips recently for a university project and have started using the new AVR Studio 5.0. I like the new software, it is based on Visual Studio and the interface is much more familiar and generally easier to use.

I did face some problems though.  I use a usbTinyISP device to program my AVR chips and this worked fine with the old versions of AVR Studio after following the guide over at ladyada.net, however this trick doesn’t work with AVR Sudio 5.0. I could have used AVRdude and then compiled my design in AVR Studio then used the command line to program the chip, but I wanted  a more intergrated method.

So here I what I have set up:

First download the winAVR package from here: http://sourceforge.net/projects/winavr/

Install it, making sure you check the box to add the directory to the path (this will make the next stage easier)

Now go into AVR Studio and go to the ‘Tools’ menu click the ‘External tools’ item.

Now add a new tool as shown below (change the part number -m328p to whichever chip you are using). The arguments box should have the text ‘-c usbtiny -p m328p -U flash:w:$(ProjectFileName).hex‘.

 

Now to make it easier to access this ‘External Tool’, we can add it to the menu bar by customising the tool bar and adding the ‘External Tool 1’ , this appears as USBtiny when placed on the menu

You can also assign a keyboard shortcut to the new tool by going into the ‘Tools’ then ‘Options’ menu. Select ‘Keyboard’, then add the command as shown below.

Then click ‘Assign’

 

Now all you need to do is write your code. Press F7 to compile and then (in my case) press Ctrl+Shift+F7 to program using the USBTiny. The output from the USBtiny software will be shown in the output window at the bottom of AVR Studio.

 

Tags: , ,

2 Comments

  1. Kevin says:

    Ashley – thanks. Returning to microcontroller programming after gap of around 20 years (!) and new to AVR stuff so your post was REALLY useful. Many thanks
    Kevin

  2. Andy says:

    Oh, great find!
    4 years later, still good!

Leave a Comment