ks0108.h header file
/*
ks0108.h - Arduino library support for ks0108 and compatable graphic LCDs
Copyright (c)2008 Michael Margolis All right reserved
mailto:memargolis@hotmail.com?subject=KS0108_Library
The high level functions of this library are based on version 1.1 of ks0108 graphics routines
written and copyright by Fabian Maximilian Thiele. His sitelink is dead but
you can obtain a copy of his original work here:
http://www.scienceprog.com/wp-content/uploads/2007/07/glcd_ks0108.zip
Code changes include conversion to an Arduino C++ library, rewriting the low level routines
to read busy status flag and support a wider range of displays, adding more flexibility
in port addressing and improvements in I/O speed. The interface has been made more Arduino friendly
and some convenience functions added.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Version: 1.0 - May 8 2008 - initial release
Version: 1.0a - Sep 1 2008 - simplified command pin defines
Version: 1.0b - Sep 18 2008 - replaced <wiring.h> with boolean typedef for rel 0012
Version: 1.1 - Nov 7 2008 - restructured low level code to adapt to panel speed
- moved chip and panel configuration into seperate header files
- added fixed width system font
Version: 2 - May 26 2009 - second release
- added support for Mega and Sanguino, improved panel speed tolerance, added bitmap support
*/
#include <inttypes.h>
typedef uint8_t boolean;
typedef uint8_t byte;
#include <avr/pgmspace.h>
#ifndef KS0108_H
#define KS0108_H
#define GLCD_VERSION 2 // software version of this library
// Chip specific includes
#if defined(__AVR_ATmega1280__)
#include "ks0108_Mega.h" // include this for the Arduino Mega other ATmega1280 boards
#elif defined (__AVR_ATmega644__) // TODO - check this define
#include "ks0108_Sanguino.h" // include this for Sanguino or ATmega644 boards
#else
#include "ks0108_Arduino.h" // include this for the Arduino or other ATmega168 boards
#endif
yeah that is one reason i havent got a pic up, my buddy did all the same color. {Green}, the wires are labeled but i dont think thats going to show up in the pic.
I can tell you which pin goes to what though:
the numbers on the left are the position of the connections on the LCD.
the stuff following is the connections on the arduino
1 is wired to Vcc
2 is ground
3 is on the wiper of the POT
4 is DO connected to pin 8 on arduino
5 is D1 connected to pin 9
6 is D2 connected to pin 10
7 is D3 connected to pin 11
8 is D4 connected to pin 4
9 is D5 connected to pin 5
10 is D6 connected to pin 6
11 is D7 connected to pin 7
12 is CS1 connected to pin 14
13 is CS2 connected to pin 15
14 is reset connected to pin 19
15 is R/W connected to pin 16
16 is D/I connected to pin 17
17 is EN connected to pin 18
18 is connected to the POT
19 is at 5 volts for backlight with a 330 resistor
20 is ground for backlight.
hope this isnt too confusing.
thanks