Preview

Atmel Language

Powerful Essays
Open Document
Open Document
1839 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Atmel Language
Getting started with C Programming for the ATMEL AVR Microcontroller

By Lam Phung Version 1.0 Created on May 14, 2008. Last updated January 15, 2010. Latest version of this document is available at: http://www.elec.uow.edu.au/avr

© University Of Wollongong, 2008.

Table of Contents
1. 2. 3. Introduction Installing tools for C programming Using AVR Studio for C programming Creating an AVR Studio project Compiling C code to HEX file Debugging C program using the simulator Downloading and running HEX file on AVR board 2 2 3 3 5 6 8

3.1 3.2 3.3 3.4

1. Introduction
This tutorial provides information on the tools and the basic steps that are involved in using the C programming language for the Atmel AVR microcontrollers. It is aimed at people who are new to this family of microcontrollers. The Atmel STK500 development board and the ATMEGA16 chip are used in this tutorial; however, it is easy to adopt the information given here for other AVR chips. This tutorial requires the following: • the AVR Studio produced by Atmel, • the WinAVR package by Sourgeforge WinAVR project, and • an STK500 development board produced by Atmel.

2. Installing tools for C programming
To work with the Atmel AVR microcontroller using the C programming language, you will need two tools: AVR Studio and WinAVR. Both tools are free at the links given below. • AVR Studio is an integrated development environment that includes an editor, the assembler, HEX file downloader and a microcontroller emulator. AVR Studio setup file and service packs are available at http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2725 • WinAVR is for a GCC-based compiler for AVR. It appears in AVR Studio as a plug-in. WinAVR also includes a program called Programmer’s Notepad that can be used to edit and compile C programs, independently of AVR Studio. WinAVR setup file is available at http://winavr.sourceforge.net/ Installing these tools is easy: just download and run the setup files, and accept

You May Also Find These Documents Helpful

  • Good Essays

    C Is difficult, because the control flow is out of the hands of the application programmer…

    • 1508 Words
    • 7 Pages
    Good Essays
  • Satisfactory Essays

    Today’s lecture will be spent entirely in the computer lab. At the end of lab, submit this worksheet.…

    • 581 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Quiz Comp Archi

    • 438 Words
    • 3 Pages

    12) Please list registers and their functions in ARM. How many general purpose registers and how to use them in the program?…

    • 438 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    Motor Cyclists

    • 48192 Words
    • 193 Pages

    Report No. RSRG 2007-04 Publication date August 2007 No. of pages 152 ISBN 978 0 642 25564 8 ISSN…

    • 48192 Words
    • 193 Pages
    Powerful Essays
  • Good Essays

    Downloaded from http://cre.sagepub.com by Farhan Khan on February 12, 2007 © 2004 SAGE Publications. All rights reserved. Not for commercial use or unauthorized distribution.…

    • 841 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Manage Information Systems

    • 14521 Words
    • 59 Pages

    Publisher: Young Rabbit Pty Ltd (A.C.N. 003 381 182) trading as Australian Pacific College Ground Floor, 189 Kent Street Sydney NSW 2000 Australia Tel: (02) 9251 7000 Edition: 4st Edition Release date: July 2012 The publisher owns the copyright in this publication. All rights reserved. No part of this publication may be reproduced by any process without the prior written permission of Young Rabbit Pty Ltd.…

    • 14521 Words
    • 59 Pages
    Satisfactory Essays
  • Powerful Essays

    The following information will introduce general knowledge in basic programming concepts. It shall discuss basic types of computer programming languages as-well-as program development. There are three basic types of computer programming languages that will be discussed in a simple and easy to understand manner. We shall also describe the program development cycle and discuss why it is important to use a structured and organized process to create a computer programming language.…

    • 1318 Words
    • 6 Pages
    Powerful Essays
  • Good Essays

    LED Flasher Project ver3

    • 619 Words
    • 6 Pages

    software program written in the C programming language. The hardware circuit consists of a PIC…

    • 619 Words
    • 6 Pages
    Good Essays
  • Powerful Essays

    Jessica Codr, jmc5@cec.wustl.edu (A project report written under the guidance of Prof. Raj Jain) Download…

    • 10575 Words
    • 43 Pages
    Powerful Essays
  • Satisfactory Essays

    © the authors and HAAGA-HELIA University of Applied Sciences HAAGA-HELIA Publication Series Research 1/2007 This publication is protected by the Copyright Act (404/1961). Photocopying the publication is prohibited without a permit. More information about permits and their content will be provided by Kopiosto ry, www. kopiosto.fi. The digital copying or manipulation of the publication in full or in part is likewise prohibited. Publisher: Sales of the publication: Layout: HAAGA-HELIA University of Applied Sciences HAAGA-HELIA University of Applied Sciences Oy Graaf Ab/Jani Osolanus…

    • 41589 Words
    • 167 Pages
    Satisfactory Essays
  • Powerful Essays

    Family with low power consumption. Atmega32 is based on enhanced RISC (Reduced Instruction Set Computing, Know more about RISC and CISC Architecture) architecture ATmega32 is an 8-bit high performance microcontroller of Atmel’s Mega AVR with 131 powerful instructions.…

    • 1225 Words
    • 5 Pages
    Powerful Essays
  • Powerful Essays

    Electronc Voting Machine

    • 13812 Words
    • 56 Pages

    List of Contents Abstract 1 1. Background 2 2. Microcontroller 9 2.1 Introduction 9 2.2 History 9 2.3 Definition of a Microcontroller 11 2.4 Microcontrollers vs Microprocessors 12 2.5 Memory Unit 13 2.6 Central Processing Unit 14 2.7 Bus 15 2.8 Input Output Unit 16 2.9 Serial Communication 16 2.10 Timer Unit 17 2.11 Watch Dog 18 2.12 Analog to Digital Converter 19 3. Introduction to EEPROM 21 3.1 EEPROM 21 3.2 Application/ Operation of EEPROM 21 4.…

    • 13812 Words
    • 56 Pages
    Powerful Essays
  • Satisfactory Essays

    C coding

    • 384 Words
    • 2 Pages

    1. The codes are written in C language compiled in a virtual machine (gcc -lpthread -o soft soft.c).…

    • 384 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    The Gizduino Manual

    • 2978 Words
    • 30 Pages

    single board AVR microcontroller platform based on highly popular open source Arduino design. It can be used as…

    • 2978 Words
    • 30 Pages
    Powerful Essays
  • Better Essays

    ce2007

    • 2780 Words
    • 12 Pages

    Cyclone 3 FPGA on the Altera’s DE0 Board [1]. Coupling to the DE0 board is a Teaching…

    • 2780 Words
    • 12 Pages
    Better Essays