Orangutan-lib 0.2

A new version of Orangutan-lib is up on Sourceforge:


Orangutan-lib is a C library for AVR Studio 4 and WinAVR. It should work on avr-gcc, but the Makefiles are all generated by AVR Studio 4, and will not work right out of the box on avr-gcc.

As of this release, Orangutan-lib has support for the Orangutan and the Baby-Orangutan, and has mostly been set up so that when the Orangutan-X2 is released, full support for it can be rolled out quickly. (It’s not supported yet.)

This latest one has support for:

  • Basic A/D conversion
  • Bitfields on I/O registers
  • The Orangutan buzzer (thanks to Jim!)
  • LCD using the LCD’s busy flag
  • Pin change interrupts on all I/O ports
  • Symmetric PWM for the motors
  • Lightweight relay-style motor control
  • Code to drive up to eight servos (can be expanded to 16)
  • Code to use the hardware UART using a modified version of Pascal Stang’s code

Sorry, the docs are still a little sketchy. If there’s a particular point that’s confusing, please let me know and I’ll tackle that section of the docs to make them more readable.

If you wind up using the library and need particular functionality, please do let me know. I’m happy to go after particulars.

If you see a big glaring flaw with anything in the library, please let me know. Only way it’s going to get fixed.

If you like living on the raw hairy edge of things, the working source for the library is in a Subversion tree on Sourceforge. It’s public, you can grab the latest greatest, possibly heinously broken source any time you want. There are some advantages to this since bug fixes really do happen (no, seriously!) and get checked into the Subversion tree (e.g. after reading Jim’s posts on pin change interrupts, I re-did the code in the library to shave the time down as much as I could, and to make the eventual roll-out of the Orangutan-X2 easier. In fact the pin change interrupt code in the Subversion tree will handle all four I/O ports on the X2. This version lives in the Subversion tree, not in the 0.2 release.)

Fair warning, the coding practices in the library are probably not the best, tightest, hottest thing. But hopefully it’s readable. (Readability was ranked higher than efficiency.) Also, the library was meant to be picked apart and used piecemeal. The only interdependency that should exist is that every part of the library relies on the device.h file. Otherwise you can grab only those bits you need.

With one exception you should be able to use any compiler optimization flags you want on the library. That one exception is the UART code, which for some reason likes to optimize out its wait flag.

Have fun with your Orangutans!


1 Like