Help with LCD Setup would be great

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.

Since your 128x64 LCD is a 'Graphical LCD' you could try this library: Arduino Playground - 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.

Don

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 Google Code Archive - Long-term storage for Google Code Project Hosting.
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

#if NBR_CHIP_SELECT_PINS > 2
#define glcdCSEL3 32 // third chip select if needed
#endif

#if NBR_CHIP_SELECT_PINS > 3
#define glcdCSEL4 31 // fourth chip select if needed
#endif

/*

  • 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

#endif //GCD_PIN_CONFIG_H

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

Thanks dude, your right the last thing i want to do is blow my board. (im still very much in the honeymoon phase of my ardiouno love) so slow and steady it will be.

Im doing some more digging now, so i may soon have a few more questions coming your way. (if thats ok?)

Im so impressed with the whole open hardware scene and the people like yourself who go out there way and help the lesser mortals such as I.

again many thanks, i feel like im just coming in from the cold and its looking like a nice place to explore n learn your time and advice is hugely appreciated.

Ask away with questions.
Sounds like the Ebay seller didn't provide much information.
If you are looking for a data sheet, usually the part numbers on the back of the
glcd module can be searched to locate at datasheet.

---- bill

bperrybap:
Ask away with questions.
Sounds like the Ebay seller didn't provide much information.
If you are looking for a data sheet, usually the part numbers on the back of the
glcd module can be searched to locate at datasheet.

---- bill

Your right about the lack of documentation, it came with absolutely zip,zero,nada,nowt. so's all i got to go on is whats being served online in html / pdf / YouTube etc but to be honest the price for the board was great and the delivery was eeriely fast despite coming from hong kong *4 Days and one of those was because i was out and it needed a signature to collect/confirm delivery (my gfriend is ebay-a-holic)even she claims never to have seen the likes in regards to speedy delivery & that's from anywhere in Europe (excluding UK,which being home) -arg i digress on with the point (did i even have one?) ((Ah yes, yes i did()

so despite the lack of anything whatsoever in regards to pre-bundled literature/datasheets and the likes has been surpassed by the amazingly newbie friendly online communities (such as here and people willing to lend advice such as yourself which are a godsend (i'd be waaaayyy screwed without people like yourself and sites such as here)

so today's the day i have put aside to get this lcd and my arduino to make up and play nice together, i will report back with my results if its of any interest to anyone out there.

perhaps i could even write up a tutorial on how exactly to achieve harmony with my Arduino ATMega128 and the TM1284L-2.

needs to be said again, thank you all (esp you bill) for your efforts in this wonderful world of open source hardware. Im already wondering what life without an new ongoing project might be like (shudder*)

anytime your in the uk/london area please let me buy you a beer or breadboard or something)

thanks
7anked

I was unable to find a datasheet for a TM1284L-2 lcd. Are there any other numbers on the back of the lcd?
Could you perhaps take a photo of the back of the board and post it here?
Use the macro option to keep the picture in focus so the print on the board will be nice and clear.

Also, you might want to ask the ebay seller if he could point you to the datasheet for
the lcd.

--- bill

I was unable to find a datasheet for a TM1284L-2 lcd.

Isn't it more likely to be a TM12864L-2 ?

Don