(edit sidebar)
Intro to Physical Computing Syllabus

Research & Learning

Other Class pages

Shop Admin

ITP Help Pages
Tom's pcomp site
DanO's pcomp site


AVRC Programming-Compile

AVR C PROGRAMMING WITH AVR STUDIO 4 - COMPILE AND PROGRAM

Get the code in the body of the myProject.c. Make sure the mytimer.h is in the project folder and you are ready to compile and program.

Go to the build menu and select build. Avr Studio looks for errors.

Check out the message box at the bottom of the window. If you get the build succeeded, you're good to go.

Go to Build>Compile. Avr studio compiles the project and alerts you of any errors.

If you get this messge, you can continue.

Find the avr button on the tool bar and press it.

Programming controls pops up. Though there are many tabs in this control window, we are going to stay int he first one, program. Notice how there are five sections to the control window. Device, Programming mode, Flash, EEPROM, and the message window. We are going to focus on the section labled Flash and the message window. First look at the Device section and check that the device listed is the correct one for your cip. For this tutorial it should say ATmega8.

AVR Studio 4 immediately looks for the ISP programmer. The message window at the bottom of the controls reports any errors.

First we are going to make sure we are using the correct hex file. Click the browse button in the Flash section and a open dialog will appear.

The hex file for your project is in the default folder of your project folder and shares the same name as the project. The open dialog is set to look only for hex files, others will not appear making it easy to find your hex file. AVR Studio 4 creates these folders for you and generates the hex file. Select the hex file and click OK.

In the Flash section click the "Program" button.

The status light on the programmer will turn orange.

The message window at the bottom of the controls reports a pass/fail. With no errors you will have a blinking led.

Congradulations This is the end of the tutorial

  Edit | View | History | Print | Recent Changes | Search Page last modified on July 19, 2007, at 03:23 PM