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
Now you will get a window like this
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.
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
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.
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
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.
Done. Now you can program in Atmel Studio and burn the hex from IDE itself with the help of USBasp.
Embedded System Engineer