Go Down

Topic: GLCD problem (Read 2 times) previous topic - next topic


Feb 18, 2011, 09:27 am Last Edit: Feb 18, 2011, 09:29 am by bperrybap Reason: 1
I saw the data sheet. But then Peter also said he was now getting
0 to -5 on his pot wiper. I assumed (perhaps incorrectly) the the
pot was hooked to pin 18 and that it was not grounded, which would
mean that pin 18 was really Vee and not Vss.


I would not connect pin 18 to ground, if pin 18 is really Vee then
connecting it to ground will potentially fry the on board negative voltage
First thing should be to disconnect pin 18 from everything and measure
its voltage.

If the glcd DISPLAY_ON commands fail, the lcd display may not be on.
Some modules power up on and some power up off, some turn on
only 1 of the 2 displays, and some power up randomly enabled.
The only way to make sure the full
display is on is to send the DISPLAY_ON command to each display.
If a display is not on, no matter what the contrast input is, you will see nothing.
because the display is off.

First thing is to measure the voltage on pin 18 with nothing connected to it.
if it is negative voltage then hook it up to the pot and make sure the
negative voltage is present on pin 3.

If so, then it is likely there is a reset issue affecting the
low level initialization in the library communication
to the glcd module and the DISPLAY_ON command is not working properly.

--- bill


Feb 18, 2011, 12:36 pm Last Edit: Feb 18, 2011, 12:41 pm by floresta Reason: 1
Bill, I tried to get him to measure the voltage on pin 18 back in reply #9.  It just dawned on me that he has to have the +5V supply connected as well for this to work and now we get back to the issue of the correct connections that I mentioned in reply #11.  What is your take on that part?



Since diags passed, pretty much all the other connections have to be correct.
In particular 5v and gnd on pins 1 & 2. The only things left out of diags
is RESET, contrast control, and led backlight.
The diags also can't verify if the chip select pins are hooked up correctly
but that will be a simple visual thing once the display becomes visible.

So I think since the glcd passed diags, and the first post says
"the display lights up", that it is down
to contrast and reset control.

Can you tell us exactly what is hooked to glcd pins 3, 14, and 18.
Don't hook ground to pin 18, but tell us the voltages you
see on pins 3 and 18.

--- bill


Since diags passed...

Oops - I overlooked that part.

I still think it's the potentiometer connections.  As Nick mentioned in reply #10 the data sheet mentions Vee (in one of the diagrams) but there is no Vee shown on any of the pc board pins.  Since pin 18 is labeled Vee on the datasheet for other boards this may very well be a typo or editorial error on this datasheet.



Hey there... wanted to offer you some advice that got me through my frustrations with this panel.

I have the ks0108 LCD as well, and the trick to getting it to work is to make sure you are using the correct wiring diagram for your version of the panel... in my case, i had the B model so had to use the B wiring.

The pdf datasheet tells you how to tell which version of the panel you have.

The other issue I had was my screen width was offset... by that i mean, instead of going 0px - 128px, my display was working like this 64px-128px0px-63px.  So 0 was in the middle of my screen and if i wrote text it was wrapping to the other side.

The fix was an update to the glcd by removing the #define glcd_ xy 2 chip macro and modifing it to handle the offset.  It was a pain in the butt, and is a dirty hack, but it does work perfectly.

Since I am more a fan of having it work well, then getting it to work well, correctly, at the cost of alot of time, I'm happy with my solution.

I also built a simple harness for the glcd screen that I'm using that works wonders, (Basically a simple 'shield' that instead of riding on the arduino, uses a ribbon cable so that I can mount it anywhere I want in my enclosure.)

Best of luck to you


Feb 22, 2011, 06:56 pm Last Edit: Feb 22, 2011, 07:00 pm by bperrybap Reason: 1
(I'm assuming you were running the newer "glcd" library vs the older "ks0108" library)

If I understand your issue correctly (right and left screen halves reversed),
it is easily resolved without having to modify any code.
There should be no need to have to modify the macros down in "glcd/device/ks0108_Device.h"
or any of the source code.
If there is, I'd very interested in the issue to update the library accordingly.

What you were seeing can be caused by the software and the hardware
being out of sync with each other with respect to chip selects.
i.e. the chip select wiring does not match the software configuration.
This can be resolved in one of two ways. Either
- swap the two wires on CSEL1 and CSEL2 pins on the glcd module
- flip the pin definitions for glcdCSEL1 and glcdCSEL2 in your pin configuration file.
(that would be glcd/config/ks0108_Arduino.h if you are running on a standard arduino
and using the default configuration)

This is mentioned in the PDF documenation on page 8 in the "Troubleshooting" section.
The glcd library also includes lots of html documentation that has a brief trouble shooting section that mentions
the possibility of screen halves reversed and how to resolve it.

Perhaps these sections need to be expanded a bit for clarity.

Take a look at the html documentation under the "Troubleshooting" section.
You can find the html documentation down in:

The diagnostic sketch included in the glcd library is good for resolving these kinds of issues
as it has a chip select test that is designed to visually show the orientation of the chips. This is very useful
for helping to resolve any chip select wiring issues.

I'd be very interested if simply swapping the two CSEL wires
with the original code didn't resolved your screen issue.

--- bill


Sorry for the delayed response and thanks for all the help

Contrast issue is now solved..

Solution for this GLCD was:
Vdd to +5V and trim pot
V0 to wiper
and -9V to trim pot and +9V down to Vss

maybe someone can re write this in the right way I doubt my way was right



maybe someone can re write this

Pin 1 (VDD) to +5V and one end of potentiometer
Pin 2 (VSS) to GND and +9V
Pin 3 (V0)  to wiper of potentiometer
            other end of potentiometer is connected to - 9V

These connections are for any LCD or GLCD that requires a negative voltage on the contrast pin.  It appears that you are using a separate 9v source for the negative voltage.  We still have not established if your datasheet is correct about pin 18. 

Could you please tell us what voltage you measure at pin 18 with respect to pin 2?


Go Up