AVR

From OmgaV Wiki

Jump to: navigation, search

Contents

AVR 8-bit RISC architecture

Introduction

AVR 8 bit microcontrollers

Installing the software

Linux

If you are really lucky, your distro has the avr-toolchain in its package manager. So, simply do a search for 'avr' and look if something turns up.

  • If it does, install as you would install any other program and you are ready to go!
    • Debian/Ubuntu: sudo aptitude install gcc-avr avr-libc
  • If it doesn't you have to get the sources and compile them yourself (This can be done by following this guide.)

Windows XP

Simply download the latest AVR Studio and install.

Windows Vista

Simply download the latest AVR Studio and install.

Issues

AVR Studio 4 might crash on Windows Vista if you try to compile a C-project. Uninstalling Microsoft Office (if you have it installed) will fix the problem. AVR has released a patch that will also fix the problem (without uninstalling Office). The patch (Service Pack 1, build 557) is available here.

Uploading the code

When you've compiled some of the examples below, you need to upload the code to your microcontroller. How you do this depends on your hardware tools and your operating system.

STK500 & Linux

If you own a STK500 and wish to upload your code to a microcontroller under Linux, you probably want to use avrdude.

  • avrdude: Follow the instructions you can find here

Examples

Simple Examples

A collection of simple examples of C-code can be found here

AD Examples

AD examples can be found here

Interrupt Examples

Interrupt examples can be found here

--Oybo 06:06, 31 October 2007 (CET)