Go Down

Topic: How to use a GLCD? Need lots of help! (Read 3918 times) previous topic - next topic

Hi all,

So I bought this GLCD: https://www.sparkfun.com/products/710

I'm new to LCDs, not to mention GLCDs. I've never used one before, and I'm a beginner with Arduino's in general. I have no idea where to begin to use this GLCD. I've been looking around for guides and tutorials, but couldn't find anything quickly. So maybe the community can link me to or give me the information I need to wire up and program this thing.

What I'm looking to do is to learn how to use the thing in general. You know, the basics. Then more specifically, I want to create a live stopwatch on this GLCD, as my project will be to make an automated stopwatch and have it output the results to this GLCD.

Thanks for the help!


I am not sure if your display is covered by the glcd v3 library but it might be worth checking.If you download the glcd-v3-20111205.zip here and have a look in the doc folder, there is a lot of information in the  GLCD_Documentation.pdf file in that doc folder.
Also the GLCD library version 3 thread of the forum here has a lot of additional information


Here is the link to the ks0108/GLCD playground page.
Start there, lots of information and it has links to all the software Pedro mentioned.
Down in the glcd library examples, you will see a demo called BigNums.
It creates multiple live stopwatch type outputs on the display.

--- bill

I checked out that link that bperrybap posted. I'm looking at the chart that shows the GLCD Pinouts. I'm a little confused as to how to read it. I have an Arduino Uno, and I don't see an Uno on the chart. Am I supposed to use Pinout B since I have a GLCD ks0108B?


I have an Arduino Uno, and I don't see an Uno on the chart

A Uno is the same as this:-
ks0108_arduino.h <- this is for ATmega168 and ATmega328 boards


Be careful with the chart.
I've not really  a fan of Pinout types in the chart.
They are not for a chip but rather specific glcd modules.
They can be useful but I think they tend to encourage "guessing"
and trial and error which can potentially damage the Arduino or the GLCD.
The issue with glcds is that they don't have a common pinout like the hd44780 text type lcds.
I've seen close to a dozen different pinouts for various ks0108 modules.

The best way to hook up the glcd is to go by the data sheet (of the glcd module not the chip)
and the chart.
It is critical that you have the correct glcd module data sheet as hooking up the glcd wires
incorrectly can damage it or the Arduino.

Once you have the correct data sheet, look for the pinout of the module.
You will see that the glcd pins have labels that match the labels in the "Function" column of the chart.
Then start hooking up the glcd pins 1 by 1 according the chart
for your board, ignoring the "Pinout x" columns, and going down the "Function" column.

The first entry in the "Function" column is +5, look at the data sheet and see
what glcd pin has power.
Same for Ground.

Say that data sheet shows that D0 is glcd pin 7.
Scan down the "Function" column until  you get to D0,
Then look left at the column for your particular Arduino board
in your case since you have an UNO use the "Arduino 168" column.
You now see that:
glcd D0 pin needs to connect to Arduino digital pin 8  (so by the above example, glcd pin 7 would go to Arduino pin 8)
Other glcd functions:
glcd D1 pin needs to connect to Arduino digital pin 9
glcd RW pin needs to connect to Arduino digital pin 16 or Analog pin 2

for each of the glcd pins.

Pay very close attention to the wiring of the pot.
There are several notes about this on the playground page and in the HTML
documentation included with the library as it is not wired up the same
way as a hd44780 text based lcd pot.

When you have it all hooked up, run the GLCDdiag sketch.

--- bill

bperrybap, you're awesome! Thanks a bunch, I'll try it out and see how it goes.

One more question:

Looking at the GLCD's page that I bought it from on SparkFun: https://www.sparkfun.com/products/710

I see two documents that have pinout charts for the GLCD. There's the datasheet, and then the manual labeled under "Documents" as GDM12864H.pdf. The chart pinouts are very different from each other, and I'm not sure which one to use. Which one is the safer bet?

GDM12864H.pdf is the datasheet for the LCD module itself, while the 'datasheet' link in the description is for the KS0108 controller chip, in your case it isn't very important.


As Coolest said, you want & need the document with the pinout for the glcd module
as that is what you are hooking up to the Arduino.

See page 3 of the datasheet, you will see diagram of the pins for your module.
Note where pin 1 is for reference as the actual board not have pin numbers.
Then look a the Interface pin connections table.
That is the table that shows what needs to connect to each of the 20  glcd module pins.

--- bill


One other thing,
Before you start hooking up the wires, make sure that the glcd module you actually have
matches the datasheet. Sometimes even companies like SparkFun will post a datasheet
that does not match the product they ship.

Look at the back of the module and make sure the markings for the module
match the part number in the datasheet.

--- bill

Thanks for the help! Very useful info you've giving me.

Another question: Looking at this page http://playground.arduino.cc/Code/GLCDks0108

Back to the pinout chart. Under the Arduino 168 column, some of the pin references say "external." What does this mean?


I don't know what the original intent of "external" was.
Those glcd signals don't apply to the board.
They are signals that obviously have pin numbers and then there is
a comment.
Just read the comment for the glcd signal and hook it up appropriately.
I have updated the chart to now say "n/a" for those signals in board columns.

--- bill

So does that mean those aren't required to make the glcd work? From what I gather, they're to adjust contrast and backlighting levels of the glcd, yeah?


So does that mean those aren't required to make the glcd work? From what I gather, they're to adjust contrast and backlighting levels of the glcd, yeah?

It means those glcd pins do not connect to the arduino.
They are "external" to the Arduino.
They are still very much required to be hooked up.

All the pins in the glcd "Function" column must be hooked up.
You go down the Function column and then look left to see which Arduino pin
to connect to (if any) based on which board you have,
then look right to read the comments about that connection in the "Comments"

--- bill

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131