Easy to use, lightweight and unified library for performing common microcontroller tasks
C Shell
Switch branches/tags
Nothing to show
Latest commit 3aecd1a Apr 4, 2012 @H2CO3 Removed erroneous getter


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

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 <MCU type> <clock frequency> <upload-baudrate>
	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/genproj.sh) to make a project template
	which has all the neccessary parameters set up correctly. Run the makegen.sh
	script first (only once) in the latter case. It will generate a template makefile, used by genproj.sh 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!