Sample Atmel AVR Code for the
SparkFun Graphic OLED Color Display 128x128 (LCD-00712)

Last Updated April 30, 2009

The following sample code is distributed under the GNU General Public License. It comes with no warranty or support.

This sample code (21k ZIP, 2-1-09) is designed to control SparkFun's Graphic OLED Color Display with an Atmel AVR microcontroller.

The sample code was written for an Atmel ATmega644 AVR microcontroller, but should run on the mega16, mega32, mega128, etc.

Note: This project is intended as an example of how to communicate with the SparkFun OLED. It assumes that you are familiar with programming the Atmel AVR family of microcontrollers. If you are not, it would be a good idea to find another project as a learning tool.

Some tips for using the code...

  • Read the _readme.txt included in the ZIP.
  • Look at the code in main.cpp for examples of how to use the features in the OLED code.
  • Read the comment at the beginning of "makefile" to see what commands you can specify.
  • Use the "make setfuse" command to ensure that your microcontroller's fuse bits are set for the sample code (e.g. 8 MHz processor speed). You only need to do this once; the fuse bits are persistent.

If you are interested in more graphic-display code, check out the Color LCD Sample AVR Code page. It provides sample C++ code designed to control SparkFun's Nokia-like graphic color LCD. That project is more full-featured, including code to render fonts and PC-based utilities to generate the microcontroller memory images for fonts and graphics.