We have released a new version of the Pololu AVR Library with several improvements and bug fixes.
Most importantly, the library now supports our latest controller, the Orangutan SVP-324. We added a new OrangutanSVP section and changed several other sections to support special features of the SVP.
The OrangutanAnalog section now supports the Orangutan SVP’s 4 auxiliary input lines, trimpot, and battery voltage reading. The isConverting() function now conforms to its documentation, returning 1 when the analog-to-digital conversion is happening instead of (1<<ADSC).
The OrangutanLCD section now has a 10 ms timeout while waiting for the LCD’s busy flag to go low. This prevents OrangutanLCD functions from taking forever to return when called in setups where the LCD is not connected and the BF line is not pulled low (such as the SVP).
The OrangutanSerial section now supports multiple serial ports on the ATmega324/1284 (UART0, UART1, and the USB serial port), but your old serial code should still work if you are not using an SVP.
The library also comes with three new sections:
[li]OrangutanDigital lets you use digital outputs, inputs, and pull-up resistors without worrying about bit shifting and special function registers like DDRD.[/li]
[li]OrangutanServos uses Timer 1 interrupts to generate control pulses for up to 16 servos (with special support for the Orangutan SVP’s demultiplexer).[/li]
[li]OrangutanSPIMaster allows you to use the AVR’s hardware SPI module to communicate with SPI slave devices.[/li][/ul]
We also fixed several bugs in the previous library release (091125). The most noticeable bug was in the “print_long” and “print_unsigned_long” functions, which would generally only print the first digit of the number correctly and then print garbage. The bugs appeared when the library was compiled with a slightly old version of avr-gcc (4.3.0). This new release was compiled with avr-gcc 4.3.3.
We have also fixed a bug in the makefile which caused the library to be installed in the wrong place on some Linux computers. You can type “make prefix” to see where the library thinks it should install itself and read the comments in the makefile for more information.
You can download the library here. Please let us know if you have any trouble installing or using this version, and send us your comments and suggestions!