Configure AVR Studio

Open AVR Studio from your program list. Select New Project in the window and Click Next.

AVR Studio - Default View

Select "AVR GCC" in project type. Provide a name for your project and the location (Project Directory) where you want the files to be stored. "Create folder" checkbox will be unchecked by default and checking creates separate folder for each of your project. Do not add extension to your project name as .c or .hex.

Project Name

In the next window, select "AVR Simulator" under Debug platform, and the AVR device you have chosen (ATmega8 is selected here) and click finish.

Device Info

This opens up your default AVR Studio window. If any sub-window or toolbar is not visible, then enable it by going to View -> Toolbar and then the required option can be checked. Now select Project -> Configuration Options from menubar.

Config Options

Here you can set the frequency and optimization level required. Frequency is set to 1000000 in this case and optimization is set to -Os. If you need to use an external "makefile", check "Use External Makefile" option and browse for the required makefile. If this is not checked, AVR Studio creates a makefile in the "default" folder within the project directory.

Config Window

Click OK to return to the main AVR Studio window. This is the place where you write your code, debug, build etc., etc.,

Default Window

Type, Copy Paste, or do whatever you want and get your program into the code area. Click "Build -> Build" (or Alt-B-B or even F7). If you are compiling it again, you can use "Build -> Rebuild All" option. If your program is good enough then you get a message "Build succeeded with 0 Warnings...". All set and you are successful in building your program.

Open the Project directory where you find your xxx.c file, default folder and other supporting files. Open default folder where you find another set of files. xxx.hex is the intel hex file which is of interest and the file which you upload into your microcontroller. You can also find makefile created in this directory.

Next we will see how to install PonyProg and upload the .hex file into the microcontroller.

Do you have anything to say?
Visit the Forum to discuss, learn and share anything related to robotics and electronics !!

rss feeds



Featured Videos




Advertisements


Recent Articles




Atmega8 Development Board


A great step-by-step tutorial on building your own Atmel AVR based Atmega8 development board. The board is ideal for beginners with detailed explanation and pictures More...

L293D Motor Driver


For robots to do work, you need to know how to control a motor. L293D is a cleverly packed IC which can control two DC motors in both directions: forwards and reverse. Here is a detailed explanation of building a board based on L293D ICMore...

Hobby Servo Tutorial


Servo Motor is a device which uses error-sensing feedback signals to determine and control the position of a motor shaft. The term "servomechanism" closely relates to servo motors..More...

Blinking LED Tutorial


This is similar to what we achieve in any "Hello World" program. However, it is not just limited to blinking LED but scratches the surface of AVR-GCC programming... More...


Kindly Donate

If this site has helped you, then kindly consider a Donation to say "Thank You!!". Donation might help us keep all this information available for free and also pay for the resources.

If that is difficult, then a simple "Hi" in the forum would still do good :)