Sample Atmel AVR Code for the
SparkFun Nokia-like graphic color LCD
Last Updated August 21, 2006
The following sample code is distributed under the
GNU General Public License.
It comes with no warranty or support.
This sample code (124k ZIP, 8-21-06)
is designed to control SparkFun's
graphic color LCD 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.
The code uses C++ classes. If you have ever forgotten to set the direction
register for an output, or neglected to call a setup function to initialize
a counter, you'll appreciate that the class constructors automatically take
care of all the setup required for each object.
Note: This project is intended as an example of how to communicate with
the SparkFun graphic LCD. It assumes that you are familiar with C++ and
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. It contains lots of
- Look at the code in main.cpp for examples of how to use the features
in the LCD code.
- For files in the "lib" (library) folder, look at the code in the .h files
to see what each object can do. You shouldn't need to modify the .h or .cpp
files in the lib folder.
- 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.