[SOLVED] 128x64 LCD Guide. Can't see the components in Picture. Please identify.

There are two black-ringed white circles on the breadboard that I do not know what they are. Do they represent capacitors?

[Image Attached]

I have not found a decent wiring diagram for the larger LCDs. Anyone have something better than these?

This one isn't one I can use since it isn't for the Uno.

This is the LCD I have:

Thanks for the heads up in advance.

tumblr_l0pyjeuscE1qbpci0o1_500.png

looks like potentiometers, one for contrast adjustment, one for backlight brightness, I'd use a 10 kohm one for the first and a 1 khom for the second

I'm not sure why you think you can't use the diagram on the playground site.

The diagram with the black circles (potentiometers) has incorrect wiring for the contrast pot.
The contrast pot has 3 connections that needs to be wired like this:
leg------ vee
wiper--------------------- Vo
leg------ gnd

The diagram with the breadboard shows:
leg------ vo
wiper--------------------- vee
leg------ (not connected)

The pot wiring is described several times on the ks0108 playground page and in the html documentation included in the library.
The html documentation included in the glcd library can be viewed and searched with your web browser.
There is a wealth of additional information in the included html documentation that is not on the playground page or
in the included pdf documentation.

The display in the spec sheet you linked to is "Pinout A" in the wiring table that is on the playground page
and also in the HTML documentation included in the library.

The diagram you referenced from the playground page is correct for your glcd.
For your Arduino, you may need to hook up the glcd modules reset (glcd module pin 14) to
vcc using a resistor rather than hooking it up to the Arduino reset line - to avoid auto reset issues
on the UNO board.

If you prefer, you can use the wiring table rather than a wiring diagram to hook up the wires.
For the glcd your referenced, simply follow down the "Pinout A" column and wire up the pins
according to the Arduino pins referenced in the "Arduino 168" column.
So for example, if you look in the "Pinout A" column you can see that glcd module pin 4 is connected to
Arduino pin 8.

--- bill

I gave it a shot. I thought I had it but once I powered up the Uno board via USB, the power light comes on very dim then shuts off.
I am going to look over the connections once more. They looked right the second time I checked them. I switched the two legs on the pot, +5 and ground, but I don't think you can hook them up backwards, the two outside legs. They can be connected either way, right? I have One outside leg to 18, the other to 20 of the LCD. LCD pin 3 is connected to the center leg of the pot. The resistor I am using for the pin 19 of LCD is 330 ohm. I believe it's from left to right, orange, orange, brown, gold. I think the multiplier is brown. It's hard for me to tell if it's brown or red but I think it's brown.
The potentiometer is the one that came with the UNO kit. I believe it's the 10k one.

EDIT: Ok, I've redone the wiring completely and still same issue. Doesn't appear to be anything wrong with the Uno; I tested it with the wires removed. Lights ok.

Thanks in advance for any help.

EDIT: "hook up the glcd modules reset (glcd module pin 14) to
vcc using a resistor rather than hooking it up to the Arduino reset line "

Ok, I am going to try that. I was thinking resetting might be light on and off. But maybe it's happening so fast that the light appears off.

Ok, one thing I did find wrong was that LCD's pin 20 has to go to pot leg 3 AND ground.

Also, I now have the LCD's pin 14 passing through a 330 ohm resistor before going to reset on the arduino.

Same thing is occuring, the arduino's board lights come on and then fade off. Staying off.

I'm gonna keep researching.

THis is what I am following:
http://www.arduino.cc/playground/Code/GLCDks0108

Foolios:
I gave it a shot. I thought I had it but once I powered up the Uno board via USB, the power light comes on very dim then shuts off.

Sounds like bad wiring is creating a short. Time to stop and post how you are connecting things
and show some photos of your wiring.

I switched the two legs on the pot, +5 and ground, but I don't think you can hook them up backwards, the two outside legs. They can be connected either way, right? I have One outside leg to 18, the other to 20 of the LCD. LCD pin 3 is connected to the center leg of the pot.

Yes, the outside legs on the pot are the same, but I'm not understanding what you have done.
The first sentence above seems to conflict with the second sentence.
There are 3 connections on the pot and it must be hooked up the way I noted in reply #2 above.

What do you have connected to each of the 3 connections on the potentiometer?


Best bet now is to stop and not play around anymore and post your wiring as it sounds like there is
a short due to incorrect wiring or some thing is drawing way too much current.
Continuing like this could possibly damage the Uno or the glcd.

See if you can take some close up macro photos of your wires at the glcd header and where the wires
are connected to the UNO and the wires connected to the pot.
And then take a wide shot of everything.
The most important thing here is to have clear enough photos to be able to identify where every wire is going.

--- bill

Ok, I will try to get some photos. But since I have been looking over both this:
xternal external Vee (Contrast out) 18 18 18 connect to one leg of 10k or 20k pot
external external Backlight +5 19 19 19 100 to 330 ohm resistor to +5v
Gnd Gnd Backlight Gnd 20 20 20 Also connect to other leg of contrast pot
on the page:
http://www.arduino.cc/playground/Code/GLCDks0108
which reads pin19(LCD) should be going through the resistor. And that pin20(LCD) should be connected to both the ground and one leg of the pot.
But the picture on the same page:

pin20(LCD) passes through the resistor while 19(LCD) goes straight to hot(+5v)(Arduino).
The picture also shows that pin2(LCD) goes to ground and the other leg of the pot.

So the pic is showing that pin2(LCD), pin3(LCD), and pin18(LCD go to the pot with pin2(LCD) also grounded(GRND)(Arduino) at the same time.

While the list reads that pins 2,3, and 20 are the ones going to the pot.

I am thinking that the problem with short circuiting lies within the way that I am hooking up the pot. Can I have a pin from the LCD and ground connected to it at the same time?

I will try to take pics of how I have been wiring. I have tried wiring it according to both ways and the light dims out either way.

Here's shot number one:

I will take one of the way that the pot is wired. I think it's either gonna be too much resistance or I am grounding out somewhere at the pot.

Here's the pot:

EDIT: wups, that's not where the ground wire is going. I was putting things back to the alternate attempt and got one in wrong spot.
Please pretend that the ground is going to the blue strip of breadboard and not red as in pic.

And here's the entire setup. If there needs any clarification. I will gladly post where each wire is going. I am following this list:

Along with this datasheet:

EDIT: Ok, so after placing the grounded right leg of pot which is also the LCDpin20 grounding; The Arduino green/yellow LED's light up real nice for one second, then dims and stays off.

You are correct in that the figure and the table on the playground site are a bit out of sync with respect to how to wire up the
current limiting resistor for the backlight.
The resistor just has to be in the current path. It can be connected to the anode (+) or cathode (-) of
the backlight. When connected to the anode it will be between lcd pin 19 and +5v,
when connected to the cathode it will between lcd pin 20 and gnd.

The pot needs one of its legs connected to ground. (not really pin 20). Pin 20 was just a convenient place
to get a ground signal based on the wiring in the table. (I updated the table on the playground to try to clarify this)

I'm not sure what is causing the excess current draw.
It's hard to tell where all the wires go.
Be very careful with this situation as this excess current draw can potentially damage the glcd or the Arduino.
So try to power it up as little as possible and for as short a time as possible when it is powered up until
things get sorted out.

A few questions:

  1. Are you sure that data sheet is for that glcd?
    There are many different pinouts for ks0108 glcds.

  2. how are you powering things? USB? external?

  3. What sketch is running in the AVR? An incorrect sketch can potentially
    create a situation between the glcd data lines and the pins they hooked up to on the Arduino
    where the pins are fighting each other. (glcd and Arduino both driving the pin with one driving high and
    the other driving low) This can draw lots of current and even potentially damage the glcd or the Arduino.
    If you are unsure what sketch is in the AVR load up the blink sketch which should be harmless with this wiring
    or better would be to load up the glcd library diagnostic sketch.
    This may require disconnecting some or most of the wires to the glcd fist.

A few other comments:

The glcd reset pin (14) has a special note about it on the playground page.
Normally it will be hooked up to directly to the Arduino Reset, or not hooked anything, or
or to VCC (if doing that I recommend using a resistor).
-- See the note on the playground page for details on the glcd reset pin.

glcd backlights can draw quite a bit of current - several hundred milliamps.
Depending on what is powering the Arduino, it may consume more power than
the power supply can handle.
In your case it shouldn't given the 330 ohm resistor, but I can' see the wiring
on the glcd backlight pins to verify the connections.
(You could use the resistor as a wire and connect one end to the +5v rail and the other to glcd pin 19)

To test the backlight by itself, you should be able to just hook up pins 19 and 20 of the glcd
with nothing else hooked up.
20 to gnd, 19 to resistor and then other end of resistor to vcc.

For that type of glcd you should be able to see the pixels without the backlight.
You could try it without the backlight hooked up.
Just disconnect the connections to glcd pins 19 and 20.

--- bill

Alrighty, there may be two issues along the lines of what you are discussing.
For one, I didn't have a glcd sketch loaded onto the arduino. I can't get the sketch to verify or load without errors. I didn't realize that that would cause an issue. I think I've got a basic sketch(the bare minimum sketch) loaded since I couldn't get anything from the glcd libarary to load. I'll give the blink sketch a go.

For two, there might be a different diagram needed. The lcd board has printed on the back DG-12864-53. As well as on a sticker, there is printed Pacific Display Drivers: GDM-12864-75

I can't get an exact match for either of those on Google or Yahoo. The closest matches are the links I already posted and these two:

http://www.dema.net/pdf/dain/DG-12864-57-WFBLW-H-3115311900.pdf

I'll try to post a picture of the back of the lcd. I don't know if there's a way to see those couple of really important power paths to maybe deduce which diagram might be the right one.

I'll try your tips on the pins to see what happens. And then maybe follow the other diagrams where they correspond to those same pinouts to see if they are to the backlight.

Powered by USB.

I think I found the Datasheet for this display. I had to register at Omni Displays to be able to get to it.

Here is a copy:

I am going to see if there's anything different about the pinouts and post back.

EDIT: O yeah, there is a lot of difference. Ugh, totally wrong. Ok, I am going to rewire this puppy and see if it's still functional....

DG-12864-53-S2FBEB.PDF (809 KB)

Alrighty then! Looks like the shorting problem is solved. The Blink sketch is running. I see the Uno's LED flashing like it should.

Now onto the LCD. No backlight. No display when I twist the pot. I can't run the diags sketch as it won't verify for loading.

What should I do next to see what's up with this LCD?

EDIT: I guess I'll start with what you wrote:
To test the backlight by itself, you should be able to just hook up pins 19 and 20 of the glcd
with nothing else hooked up.
20 to gnd, 19 to resistor and then other end of resistor to vcc.

Ok, I tried to just get the backlight working. I realized that I can't do anything else with getting a display on the LCD until I get the uno programmed to work with it via the glcd library. I will make a new thread for that.

But now since the backlight isn't working with pins 20 to ground and 19 to resistor+vcc maybe the lcd is now bad.

EDIT: IT WORKS!!! I had the library in the wrong folder. After unplugging the lcd to load the sketch as you suggested worked. Uploaded the glcd diag and it's passing the tests.
YAY!!!!

Ok, now all that needs figured out is why the backlight isn't working.

If diags is reporting success on the serial port then that means that all the data and control lines are hooked up
correctly.
The only wires/pins left are Vo (contrast in), Vee (contrast power supply out), and the backlight
pins.

Which pinout are you now using? (which data sheet)
Where did you buy this glcd?
Are you now seeing any pixels on the display?
Can you adjust the contrast with the pot?
You should be able to see pixels and adjust the "blackness" of the pixels using the contrast pot
without a backlight on that display.

Contrast: (if not working)
How is the contrast pot hooked up?
It should be hooked up as in reply #2
If the glcd Vee power-supply signal, which is an output, is connected directly to gnd or VCC
it can burn out the Vee power supply.
If the Vee power supply gets smoked then there will be no way to display any pixels.

Backlight:
The backlight was previously working. What changed?
Do you know how it was hooked up before vs how it is hooked up now?
(This is where careful attention to details and even notes can really help)
What value resistor are you using?
What other value resistors do you have available?

For the LED, incorrect polarity won't damage it, but a series resistor
that is too small might.

The backlight typically needs a series resistor to limit the current.
If it is too low or not used, that can allow the LED to pass too much current through it and burn it out.
(That can happen quite quickly - much less than 1 second under certain conditions)
If it is too high, the backlight LED won't have enough current to light up.
The value of the resistor can vary a lot depending on the design of the board.
It can be as little a few ohms or as much as a few hundred.
And some (very few glcds) don't need a series resistor.

The best is to have a datasheet that specifies the current needs of the backlight so a safe
resistor value can be calculated.
Missing that, the safest thing is to try high, then go lower but not too fast as you can go too low.
Multi turn potentiometers are good for this kind of experimentation but there are other
ways to proceed as well depending on the values of the resistors you have at hand.

--- bill

I am using the attached datasheet at the bottom of this post.

I am seeing the pixels display. They are showing as they should with the sketches loaded. The clock sketch has a running clock. Looks nice.
The contrast does not change when I adjust the potentiometer. It appears to be full on.

I haven't had the backlight working yet. I have a feeling that pins 1-20 don't feed the backlight. I see two holes in the board to the right of the display. I believe some LCD's have their backlight power supplied by those. Not sure if this is the case. The datasheet says 19 and 20 though.

The way I have this hooked up for GLCD pins 18-20 are:
GLCD pin 18(VEE) to one leg of pot(not the wiper).
GLCD pin 19(LED A) goes to a 330ohm resistor then to +5V(Arduino).
GLCD pin 20(LED K) goes straight to GRND(Arduino).

The pot is hooked up:
One leg to GLCD pin 18(VEE).
Center leg to GLCD pin 3(V0).
The 3rd leg of pot to GRND(Arduino).

Other connections for power:
GLCD Pin 1(VSS) to GRND(Arduino).
GLCD Pin 2(VDD) to +5V(Arduino).
GLCD Pin 3(V0) to wiper of pot.
GLCD Pin 17 to reset(Arduino).

datasheet attached:

DG-12864-53-S2FBEB.PDF (809 KB)

I'm pretty sure that datasheet you referenced is not for the glcd you have.
I looked around and there appears to be several DG-12864-xxx models
that are all slightly different. The differences seem to be in the color of the lcd and backlight
with the main power, data, and control lines all being in the same positions.
That datasheet you referenced is for a EL backlight. EL (ElectroLuminescent) backlights use a high frequency high AC voltage.
The one in this datasheet uses up to 150 VAC at 1Khz with a typical setting of 100 VAC and 400hz.

Since the backlight previously was working. The panel you have isn't using an EL backlight.
There would be no way to get an EL backlight to light up with just DC voltage.

**Do you know how you wired it up when the backlight was turning on? ** - This would really help even if it was when
the power supply was shutting down and the backlight was going back off.
Was the backlight connected up without a resistor? (A to +v and K to gnd)

When you say:

GLCD pin 19(LED A) goes to a 330ohm resistor then to +5V(Arduino).

I assume you mean you mean pin 19 is not connected directly to 5v but that power goes
through a resistor like this - (I couldn't see this part form your earlier photos)

glcd pin 19 ---------- ( 300 ohm resistor ) ---------------- +5v

For the backlight, It comes down to about 1 of 3 things at this point:

  1. incorrect wiring, broken wires, wires not making connection.
  2. the backlight is burned out
  3. the resistor is too large and there isn't enough current to light the backlight.
    You could try hooking up two 330 ohm resistors in parallel - both connected to pin 19 and both connected to +5v.
    That will reduce the resistance to 165 ohms.
    Turn off all the lights and see if you see any kind of glow at all.

There are some ways to diagnose this but it depends on what you have available.
Do you have a voltmeter?
What other resistors or potentiometers do you have?


The contrast pot not working concerns me.
When rotated to one side, all the pixels should be off.
When rotated to the other side all the pixels should be on - regardless of what the sketch is doing.

Do you have an ohm meter?

I'm still curious where did you get/buy this glcd? link to purchase site?

--- bill

Nah, never had the backlight working. I think it's burned out from my previous wiring errors. I tried with two 330ohm resistors in parallel and then with no resistor at all. No hint of lighting at all.
Still looking for battery charger for camera so I can post a pic of the back of this LCD.

Yup: glcd pin 19 ---------- ( 300 ohm resistor ) ---------------- +5v

Yes, I do have a multimeter.

I didn't buy it, I got it with another lcd(smaller) that I couldn't get to work. The only other lcd I've gotten to work is the one that comes in the Arduino kit. It has a backlight; that lcd worked like a charm.

I guess I misunderstood. I thought the backlight was previously lighting up.
It could be that backlight is burned or perhaps the glcd does have an EL backlight.
If so, to make it work you need high voltage high frequency to drive it.
You can buy EL power inverters for as low as around $5 USD.

What about the contrast control. Is that working?

Is the multimeter digital?
If it is connect the meter black/- wire to gnd, then connect the Red/+ wire
to pin 3 of the glcd.
The voltage you see should be negative.
Do you see the voltage change when you rotate the contrast pot?
At one end it should be like negative 7-10 volts and as you turn the pot the voltage should
rise up to zero at the other end.

--- bill