Up: AVRLIB on Wiring and Arduino


Hands On AVR-GCC programming

Following there are examples which illustrate the use of AVRLIB on Wiring or Arduino . Most functions found on Wiring and Arduino integrated development environments (IDEs), have their counterparts on AVR-GCC . In fact those functions are function calls based or compiled on AVR-GCC in order to obtain 'ELF' and 'HEX' format files . These files in turn are downloaded to the micro controller(see §2). Functions used in this hands-on tutorials correspond to portMode(), digitalWrite(), digitalRead(), and analogRead() on Wiring .

Wiring boards resemble Pascal Stang's legacy AVRMini boards. Therefore a caveat to these programs is that they have only been tested on Wiring boards using PlanetCCRMA Linux Fedora 8. Readers working on Arduino are encouraged to modify and try this code on their boards. Main differences have to do with the ATMega micro controller, its I/O ports and memory. Therefore Arduino readers should only change port names, pin numbers and on the 'Makefiles' processor type. Furthermore Arduino IDE has been using AVRDUDE for quite a while instead of UISP. Make sure the UISP and AVRDUDE lines on the Makefiles are changed accordingly. Newer Wiring boards use AVRDUDE as well.

NOTE: The purpose of going through these tutorials surrounding AVRLIB applications, was to be able to achieve OSC communication through serial ports between AVR-like boards, and OSC applications like Pd (see §4.6). You can download these hands-on tutorials here: < avrlibwiri.tar.gz >.



Subsections
next up previous
Next: A note on DownloadersUploaDErs Up: AVRLIB on Wiring and Arduino Previous: Documentation

© Copyright 2001-2008 CCRMA, Stanford University. All rights reserved.
Created and Mantained by Juan Reyes