6. Getting Started

The Baby Orangutan will run with power applied across the VIN and GND pins, which are located at the top-right corner of the board. The device is protected by a MOSFET against accidental reverse-battery connection. The supply voltage should be 5 – 13.5 V, with an absolute maximum of 15 V, so a 5- to 10-cell NiCd or NiMH battery pack is a good choice. When the Orangutan is powered, the green power LED will be illuminated. The RESET pin can be brought low to reset the controller, but it can otherwise be left disconnected (it is internally pulled high).

To program the on-board Atmel ATmega48 or ATmega168 microcontroller, you will need an AVR ISP programmer, a compiler, and AVR ISP programming software.

  1. AVR ISP Programmer: There are a number of low-cost AVR ISP programmers available, including our Orangutan USB programmer. Please follow your programmer’s installation instructions.
  2. Compiler: If you are running Windows, we recommend you download and install WinAVR. WinAVR is a free, open-source suite of development tools for the AVR family of microcontrollers, including the GNU GCC compiler for C/C++. Please follow the installation instructions on WinAVR’s sourceforge.net page.

    To get started using a Mac, please refer to the guide written by one of our customers, Michael Shimniok. We have not personally followed the steps in this guide so we can say no more than it is a potential resource that some people might find helpful. We do not support Orangutan programming on the Mac.

    To begin working with AVRs under linux, you will need to install four software packages, which can be downloaded from their respective websites. Under Ubuntu Linux, these packages are provided in the “Universe” repository.

    1. gcc-avr: the GNU C compiler, ported to the AVR architecture
    2. avr-libc: a library giving access to special functions of the AVR
    3. binutils-avr: tools for converting object code into hex files
    4. avrdude: the software to drive the programmer
  3. AVR ISP programming software: Atmel offers a free integrated development environment (IDE) for programming AVRs called AVR Studio. This software package works with with the WinAVR C/C++ GCC compiler and contains built-in support for AVR ISP programming. Please follow Atmel’s installation instructions for AVR Studio. Another alternative is a free command-line programming application called avrdude, which comes as part of the WinAVR package.

As a first test, we recommend you try to program your Baby Orangutan with a simple program that blinks the red user LED on pin PD1: BlinkLED.zip (14k zip). This archive is a compressed AVR Studio project that is configured for the Baby Orangutan B-168. If you have a Baby Orangutan B-48, go into the project’s configuration options (via the Project->Configuration Options menu with the BlinkLED project open) and change the device to atmega48, then rebuild the project.

Connect your programmer to the Baby Orangutan so that pin 1 of your programmer’s 6-pin ISP cable lines up with pin 1 of the Baby Orangutan’s programming header and then use AVR Studio to program your Baby Orangutan. You can accomplish this by selecting Tools->Program AVR->Auto Connect, which should bring up an AVRISP dialog box. Navigate to the project’s hex file (which is created in the default directory when you build the project) under the Flash section of this new dialog’s Program tab and click the Program flash button. If everything has worked correctly, you should see the Baby Orangutan’s red user LED blinking around once per second.

For a more detailed account of how to get started using AVR Studio, including screenshots, please see our Orangutan USB programmer user’s guide. The user guide is specific to our Orangutan USB programmer, but much of the section on using AVR Studio should apply to you even if you have a different programmer.