Lecture_09 - Introduction to C for programming ATMEL microcontrollers

Lecture_09- - SEE215 Lecture 9 Introduction to C for programming ATMEL microcontrollers Faculty of Science and Technology Whats wrong with

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Faculty of Science and Technology Lecture 9 Introduction to C for programming ATMEL microcontrollers SEE215
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
What’s wrong with assembler? Assembler language programming gives very precise control over code, Such as execution time, program size, data location etc. Assembler programming however, does require a significant amount of discipline The specifics of microcontroller hardware needs to be well understood, hardware registers, as well as instructions, general purpose register allocation, program & data layout etc. Each microcontroller AVR, Microchip , Motorola etc. will have hardware & instruction set differences, making it difficult to re-use code from one microcontroller on another. The compactness of program and speed of operation are beyond question. It is often difficult to re-use code written for one application for another. Often however, we may not need this compactness or operating speed and the convenience of software of development may be more important.
Background image of page 2
What’s right with C ? C is a programming language developed by Kernighan & Ritchie. C is a basic Programming language from which most of the modern programming languages have been derived. There are many tasks which are common to all microcontrollers such as mathematics, standard input & output, string handling etc. Standard libraries exist for most functions that you wish to execute. Most microcontrollers can be written in C and the AVR ATMega128 is no exception. By using C, much code can be written, which will potentially run on any microcontroller and hence can be ported from one controller to the next. Code is more easily re-used. Some specific microcontroller knowledge is required, but much of the tedium is obviated. Floating point numbers & mathematical functions are easily Implemented. To write code for the AVR ATmega128, a C complier is required which converts the C instructions into suitable binary code. There are many compilers which will perform this task. These can cost from $0 to $1000
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
GNU-GCC & WinAVR WinAVR TM (pronounced "whenever") is a suite of executable, open source software development tools for the Atmel AVR series of RISC microprocessors hosted on the Windows platform. WinAVR is entirely free WinAVR includes the GNU GCC compiler for C which easily interfaces with AVRStudio. If you followed the installation instructions supplied when installing AVRStudo & blips, you have already installed WinAVR and are ready to use it!
Background image of page 4
C language You have already done one unit of C programming. You will soon see the the similarity, flexibility & power of C programming for AVR’s.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/27/2009 for the course SEB 323 - S taught by Professor Professor during the Three '09 term at Deakin.

Page1 / 25

Lecture_09- - SEE215 Lecture 9 Introduction to C for programming ATMEL microcontrollers Faculty of Science and Technology Whats wrong with

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online