|
AVR-LibC
2.3.0
Standard C library for AVR-GCC
|
AVR-LibC Manual |
![]() ![]() |
AVR-LibC Sources |
|||
Main Page |
User Manual |
Library Reference |
FAQ |
Example Projects |
Index |
Modules | |
| Combining C and assembly source files | |
| A simple project | |
| A more sophisticated project | |
| Using the standard IO facilities | |
| Example using the two-wire interface (TWI) | |
Various small demo projects are provided to illustrate several aspects of using the opensource utilities for the AVR controller series. It should be kept in mind that these demos serve mainly educational purposes, and are normally not directly suitable for use in any production environment. Usually, they have been kept as simple as sufficient to demonstrate one particular feature.
The simple project is somewhat like the "Hello world!" application for a microcontroller, about the most simple project that can be done. It is explained in good detail, to allow the reader to understand the basic concepts behind using the tools on an AVR microcontroller.
The more sophisticated demo project builds on top of that simple project, and adds some controls to it. It touches a number of AVR-LibC's basic concepts on its way.
A comprehensive example on using the standard IO facilities intends to explain that complex topic, using a practical microcontroller peripheral setup with a serial connection (usually attached to an USB bridge), and an HD44780-compatible industry-standard LCD display.
The Example using the two-wire interface (TWI) project explains the use of the two-wire hardware interface (also known as "I2C") that is present on many AVR controllers.
Finally, the Combining C and assembly source files demo shows how C and assembly language source files can collaborate within one project. While the overall project is managed by a C program part for easy maintenance, time-critical parts are written directly in manually optimized assembly language for shortest execution times possible. Naturally, this kind of project is very closely tied to the hardware design, thus it is custom-tailored to a particular controller type and peripheral setup. As an alternative to the assembly-language solution, this project also offers a C-only implementation (deploying the exact same peripheral setup) based on a more sophisticated (and thus more expensive) but pin-compatible controller.
Most of these projects have been primarily targeted to a board compatible with the popular Arduino Nano device, using an ATmega328P. The simple project can run on that board without requiring any additional hardware, other demos only make sense when attaching some additional components, like an LCD, external buttons, or a potentiometer.
1.9.6