Interfacing USBasp Programmer with ATMEL Studio

After the successful operation of USBasp with GNU/Linux and Windows with the help of avrdude, we planned to try out a new experiment ‘How to interface USBasp with ATMEL Studio?‘. Download and install ATMEL Studio; we tried this on Atmelstudio 6.1. Install the driver packages for USBasp (the previous post explains how to accomplish that, you can refer it here) .

Now from the menu of Atmel studio select Tools > External tools

1

Now you will get a window like this

2

Now we will add USBasp as external tool.I will explain how to give entries in those text boxes

Title                          :    USBasp

Command             :    C:\avrdude\avrdude.exe

Arguments            :   -V -c usbasp -p m324p -U flash:w:$(TargetName).hex

Intial Directory    :  $(TargetDir)

Dont forget to check Use output window and promt for arguments. After adding these entries your external tools window will look like this.

3

If avrdude is situated in some other location change the path of “Command” according to that, similarly in “Arguments” section instead of m324p you can select your controller.

Just like $(TargetDir) and $(TargetName) Atmel Studio provides some ther External Tools Macros they are

Screenshot from 2014-04-09 14:27:17

Now click Apply the click ok. Now again from the menu of Atmel studio select Tools > External tools you will be having USBasp as a menu item.

4

After compiling your project select USBasp from tools to burn that to the controller. When you click on USBasp option you will get a prompt like this

5

This is because we checked promt for arguments earlier. It’s good to have a cross check here for the controller we selected in the option.

Now if you press “OK” you can see the USBasp will burn the hex to flash.You can see the messages in Atmel Studio’s output window.

6

Done. Now you can program in Atmel Studio and burn the hex from IDE itself with the help of USBasp.

Happy Hacking  :)

Ganesh.H
Embedded System Engineer

Leave a Reply