Go Down

Topic: Help with LCD Setup would be great (Read 2 times) previous topic - next topic


Hi all,

First id like to say the work you guys are doing with this tech makes me drool and loose sleep just thinking about all the cool stuff the arduino is capable of.

my reason for posting is im stuck and a total noob, so please be nice - i have looked around the forums but i cant seem to find a soloution to my problem *which is prob so simple nobody except me would have a problem like it.

i just received my (Arduino Kit Mega kit ATmega 1280 128x64 LCD Kit blue) but for the life of me i cant seem to get it to work, i love the simple diagrams that are provided for the tutorial sections on this site and i was wondering if anyone could point me in the direction as to a similar one which will allow me to connect the display to the arduino and just run a real simple "hello world" type program.  does anyone know of such a diagram an example being (http://arduino.cc/en/Tutorial/LiquidCrystal)  but for my model (Arduino Kit Mega kit ATmega 1280 128x64 ) i got it from ebay the address with further info can be found here (http://www.ebay.co.uk/itm/ws/eBayISAPI.dll?ViewItem&item=280628614554)

it would mean so much if someone could help me out with this, i have a lot of respect for all you guys and im sure someone outthere can help a poor begger out.

thanks for reading. hope someone can help me out.


Sep 15, 2011, 04:55 am Last Edit: Sep 15, 2011, 05:03 am by floresta Reason: 1
Since your 128x64 LCD is a 'Graphical LCD' you could try this library: http://www.arduino.cc/playground/Code/GLCDks0108.  You could also try a search for 'Graphical LCD'  for for just 'GLCD'.

You might want to start out with a Character Mode LCD as they are a lot easier to program.  Any of the models with an HD44780 or compatible controller will do.  


Edit:  I think I pointed you at an obsolete GLCD library.  You want the 'GLCD library version 3' and if you can't find it with a search then it is referenced in the link just above the photograph on the page I recommended above.  


Yes make sure you use the v3 library. The v3 library is a library refresh that has many new features
over the v2 library.
As Don mentioned there is link to a thread about it on the ks0108 page.

Grab the library code from the glcd-arduino google code page http://code.google.com/p/glcd-arduino/
and then read through the included documentation down in the glcd/doc directory.
There is quite a bit of documentation on the library and how to
hook up the display as well as several example/sample sketches included with the library.

--- bill


would i be heading in the right direction by grabing the file mentioned and looking at the matching .h header file
ie ks108_Mega and using the info from there which reads -

/*  Configuration for assigning LCD bits to Arduino Pins */
* Pins used for Commands
#define glcdCSEL1     33    // CS1 Bit 
#define glcdCSEL2     34    // CS2 Bit
#define glcdRW        35    // R/W Bit
#define glcdDI        36    // D/I Bit
#define glcdEN        37    // EN Bit

#define glcdCSEL3     32   // third chip select if needed

#define glcdCSEL4     31   // fourth chip select if needed

* Data pin definitions
* This version uses pins 22-29 for LCD Data
#define glcdData0Pin    22
#define glcdData1Pin    23
#define glcdData2Pin    24
#define glcdData3Pin    25
#define glcdData4Pin    26
#define glcdData5Pin    27
#define glcdData6Pin    28
#define glcdData7Pin    29

// Reset Bit  - uncomment the next line if reset is connected to an output pin
//#define glcdRES         32    // Reset Bit


or is that just being dumb??

again thanks a million for te help so far, - should i go ahead and try matching the pins or am i in danger of blowing my lcd? and or ardino??


Yes the config files control which pin is used for each LCD function.
If you are comfortable with reading a data sheet then you can simply
go by the datasheet and the config file to make all the connections.

Make sure you have the data sheet for your specific glcd because hooking up
the pins incorrectly can damage the lcd or the arduino.
Pay very close attention to the power pins and the contrast control pins
as those are the ones that if wired incorrectly can cause damage.

Also, when hooking up the backlight, make sure you check to see if you need
a current limiting resistor. Some (most) do need one and on some if you don't
use one, hooking up the power to the backlight even briefly, will burn out
the backlight LED.

I have seen over 11 different ks0108 module pinouts so don't just
grab any ks0108 glcd datasheet you find. Make sure it matches the glcd you are using.
There are 2 or 3  pinouts that the most common but they flip the power and ground
signals on pins 1 and 2 so that is why you need to be very careful when hooking up pins.

The documentation and the ks0108 playground wiki page includes some additional information
as to how to hook up the contrast circuit (currently the wiki has a bit more than the RC2 documentation).

Guessing or trial and error on the wiring is not good, so if you have any doubts or questions about the
wiring please just ask (before you power it up) and we'll help get you up and going.

--- bill

Go Up