NEMA 17 Stepping Motor (62 oz-in 5mm single shaft)
10K Trimmer Potentiometer (Through Hole)
16x2 LCD (Liquid Crystal Display)
White Prototyping Breadboard (2x30 columns of tie strips and 2x2 rows of power strips)
Clear Prototyping Breadboard (2x30 columns of tie strips and 2x2 rows of power strips)
Single Red Through Hole LED (Light Emitting Diode)
Single Green Through Hole LED (Light Emitting Diode)
Single Yellow Through Hole LED (Light Emitting Diode)
WinAVR and the AVR-GCC programming environment and compiler is not the only environments out there. The Atmel Studio 6 is a
development environment that uses Visual Studio as its backbone. The Atmel Studio 6 is the official development environment
for the AVR line of microcontrollers and can be used with the ARM Cortex controllers developed by Atmel. The Atmel Studio 6
is a feature rich environment that contains all of the tools to program, debug and simulate all aspects of the
microcontrollers. In this section, you will learn how to install Atmel Studio 6 and configure it to program microcontrollers
using the USBTiny specifically, but any programmer can be chose and configured using these steps.
It's easy to find information about Atmel Studio 6 and the installation download just by searching for "Atmel Studio" from
google. The instructions on the Atmel site is straightforward but requires you to go through a registration process.
Atmel Studio features the ability to program the controllers as its default state, but the USBTiny is not included in the list
of programmers, so this is an aspect of configuring the software that is not so straightforward; hense, the reason I created
Since the USBTiny uses AVRDude to program the microcontroller, Atmel Studio has a feature called External Tools that we can use
to invoke the ARVDude.exe. The External Tools dialog box under the Tools menu contains the fields that allow us to run an
external program and add command line arguments (like the programmer we will use, the microcontroller part number, the hex file
to be transfered to the microcontroller, etc.).
The fields that the external tools dialog box contains is the Title, which will be shown under the tools menu for quick
execution, a command field for the the program we will execute (ARDude.exe), the arguments field to contain all of the command
line parameters, and a field that we will not use called the initial directory.
There are Macros that are used to point to specific places on the computer, but be forewarned, not all of the macros work as
you will see in the video. So lets go through each field and determine what is needed:
Command: This field will only contain avrdude.exe
Arguments: This field will contain any of the parameters that can be used with avrdude. You can use avrdude.exe to see a list
of just by entering avrdude.exe at the dos prompt (start, run, cmd.exe) and a list of the parameters will be listed.
We will use the -c for the programmer name, -p for the microcontroller part number and -U telling arvdude to put something
into the microcontroller's memory. For example:
will program the ATMega 644 or 644A using the USBTiny programmer and transfer the .hex file that is located in the ProjectDir
under the Release sub directory that shares the name with the name you gave the project. The $(ProjectDir) and $(ItemFileName)
are macros. The ProjectDir macro will have a trailing backslash which separates the sub folder of Released. The :i is telling
AVRDude that the .hex file is in the format of Intel Hex.
You can make external tools for various microcontrollers and various programmers and using the Debug folder rather than the
Release folder. Be careful to program the microcontroller using the same Debug or Release state from which the program was
built, otherwise, you will get en error in the output window stating that the file was not found. Fortunately, the information
in the output window is verbose and you will know exactly what is going on.
The procedure from starting the Studio to getting the final compiled program on the microcontroller is as follows:
Commenter Matthew Humphrey state that the following can also work and has the added benefit of using the current state (Release or Debug).