libavrutil is a collection of useful routines for programming AVR devices. Its principal aim is to provide an unified and easy-to-use interface for performing basic and more complex common tasks expected from an AVR, such as digital and analog in-and output, controlling servos, generating sound, estabilishing serial communication, etc.

The library was designed in the hope that it'll be useful on as many of the different AVR types as possible. However, the author does not have access to all members of Atmel's microcontroller family, so any contribution regarding the unification of the API or adding/fixing features are highly appreciated.

Documentation and sample code can be found in the doc/examples and the doc/html directories.

How to build and use the library:

1.) You'll need the minimal AVR toolchain: apt-get install gcc-avr binutils-avr avr-libc avrdude 2.) cd libavrutil && ./configure where MCU type is the part name of your AVR, for example, atmega328p, and clock frequency is the frequency of the system clock, in Hertz, for example 3690000ULL (preferrably suffixed by 'ULL' to make it explicitly unsigned long long). Typically, it will be either 1, 3.69, 7.3728, 8, or 16 megahertz. 3.) make 4.) make install 5.) You can now link to the bld/libavrutil.a static lib manually, or you can use the `genproj' utility (genproj/ to make a project template which has all the neccessary parameters set up correctly. Run the script first (only once) in the latter case. It will generate a template makefile, used by to generate projects from now on. 6.) In your project directory: make, then make install. This will upload your program to the AVR. Note that you may have to manually reset your AVR beforehand.

Happy coding!



Easy to use, lightweight and unified library for performing common microcontroller tasks

Libavrutil Info

⭐ Stars 20
🔗 Homepage
🔗 Source Code
🕒 Last Update 2 months ago
🕒 Created 10 years ago
🐞 Open Issues 0
➗ Star-Issue Ratio Infinity
😎 Author H2CO3