GLCD library with RAYSTAR OPTRONICS RG12864A-TIY-V display problem

Hello,

In short words, as in the topic. In longer words: we (me and my friend) are using a Arduino Mega 2560 board for tests in a project. We have connected the RAYSTAR OPTRONICS RG12864A-TIY-V (1) display exactly as mentioned in the GLCD library docs (2), compared it with the display's datasheet and everything is fine (the display has a Type B Pinout). We have downloaded the newest GLCD v3 library from the library page (2).

The Raystar display is using a NT7108 chip but according to what we have found on the Internet, it is fully compatible with the ks0108 chip (3)(4).

After uploading the GLCDemo nothing is displayed on the display (the display is just lit but nothing shown on it). After running the diagnostic test, the output was:

--------------------------------------------------------------------
Reported Arduino Revision: 1.5
--------------------------------------------------------------------
GLCD Lib Configuration: glcd ver: 3 glcd_Device ver: 1 gText ver: 1
GLCD Lib build date: Mon Dec  5 01:50:07 CST 2011
GLCD Lib build number: 442
Panel Configuration:ks0108
Pin Configuration:ks0108-Mega
--------------------------------------------------------------------
GLCD:ks0108 DisplayWidth:128 DisplayHeight:64
Chips:2 ChipWidth:64 ChipHeight:64
 CSEL1:33(PIN_C4) CSEL2:34(PIN_C3)
 RES:30(PIN_C7) RW:35(PIN_C2) DI:36(PIN_C1) EN:37(PIN_C0)
 D0:22(PIN_A0) D1:23(PIN_A1) D2:24(PIN_A2) D3:25(PIN_A3)
 D4:26(PIN_A4) D5:27(PIN_A5) D6:28(PIN_A6) D7:29(PIN_A7)
Delays: tDDR:320 tAS:140 tDSW:200 tWH:450 tWL:450
ChipSelects: CHIP0:(33,0x1, 34,0x0) CHIP1:(33,0x0, 34,0x1)
Data mode: byte
--------------------------------------------------------------------
Diag Loop: 1
Initializing GLCD
Displaying ChipSelect Screens
Walking 1s data test
Wr/Rd Chip Select Test
Testing GLCD memory pages
Horizontal Page Test Chip: 0 Pixels 0-63
Vertical Page Test Chip: 0 Pixels 0-63
Horizontal Page Test Chip: 1 Pixels 64-127
Vertical Page Test Chip: 1 Pixels 64-127
Full Module Horizontal Page Test:Pixels 0-127
Full Module Vertical Page Test:Pixels 0-127
Tests PASSED
GLCD.SetDot() speed (K ops/sec): 18.46

Does anyone have any ideas what could be wrong and/or how could we fix this situation? Thank you for Your suggestions.

(1) http://www.tme.eu/pl/Document/69fa2adcf16ab2115f64e19f4e217cd6/RG12864A-TIY-V.pdf (2) http://playground.arduino.cc/Code/GLCDks0108 (3) http://forum.arduino.cc/index.php?topic=60874.0 (4) http://forum.arduino.cc/index.php?topic=56705.msg562325#msg562325

Good news is that since diags passed, it pretty much means that all the wiring between the Mega and the LCD are correct.
The diag sketch would quickly fail if any of the wires were improperly connected.

That doesn’t leave much to be an issue.

  • contrast circuit
  • backlight

Do you know which type of display do you have?
light pixels on dark background or black pixels on light background?

Is the backlight lighting up?
If you have a display with white/light pixels on a dark background
and the backlight is not lighting up, you will not see any pixels.

How have you wired up the contrast circuit? (the pot)
Usually the contrast circuit is the likely cause of no pixels on the display.
The contrast circuit is composed of a potentiometer which forms a voltage
divider using negative power supply (Vout) on your datasheet.

one leg should be connected to Vout,
The other legg can be connected to GND or VCC doesn’t really matter
and then the wiper needs to be connected to the contrast voltage in pin which is
Vo on the datasheet you supplied.

- How do you have the pot wired up?
- What value pot are you using.
- Do you see any pixels when you rotate the pot?

— bill

The display is a FSTN Negative type - that is it "shows" dark pixels on light background - the backlight is working.

The contrast pot is connected exactly as you have mentioned - the wiper to the Vo pin, one leg to Vout pin and the other to GND.

The pot is 10k

Actually I managed to see some pixels when rotating the pot a while ago but it was the first time I've seen anything and the next 5 minutes of rotating it left and right I couldn't see anything.

Edit:

New update - I have managed to make the picture see-able by turning the pot to the GND leg end. but it is very weak + I think that the display is not correctly working, that is when viewed straight from the front I can't see anything and when viewed from a higher angle I can see the backlight and the image. Photos below

https://www.dropbox.com/s/1gcdjolpyorvy8p/IMG_20130723_002716.jpg https://www.dropbox.com/s/95ksc2dck84bepp/IMG_20130723_002745.jpg

It looks like a contrast issue. Was the lcd or pot ever hooked up incorrectly? The reason I ask is that if Vout (glcd pin 18 on your display) is ever connected to ground or VCC or even an Arduino pin it can damage the negative power supply. If it is damaged, you probably won't be able get enough contrast to see much if any of the pixels.

Test to see if the negative power supply is working using a voltmeter. Measure the voltage between gnd and Vout. You should see a negative voltage of -5 to -8 volts. If you don't have a volt meter than can measure negative voltage reverse the meter probes and put the ground probe on Vout and the voltage probe on GND. NOTE: be very careful when doing this as you don't want to short Vout (glcd pin 18) to either of the glcd pins next to it, particularly glcd pin 19 which is the voltage for the backlight. (doing so can burn up the negative power supply)

One thing to try is to connect the one leg of the pot to VCC rather than ground. The ks0108 datasheets (including yours) typically say to use VCC rather than gnd. Either should normally work. GND is often used instead as it can save a small amount of power. But depending on the display and the temperature, the display might need a slightly positive voltage. It may be worth a try.

--- bill

The voltage beetwen Vout and GND varies between -3.85 and -3.92 V no matter if one leg of the pot is connected to GND or Vcc (Vcc is 5V, right?)

glcd pin Vout (often called Vee) is an output.
The voltage on Vout should not vary much if at all when rotating the pot.
The voltage that will vary will be the voltage on the pot wiper pin that is connected to
glcd Vo pin which is an input.

While having the pot connected shouldn’t matter when measuring the voltage on Vout
to ensure that there isn’t some issue with the pot,
it would be best to measure it when nothing is connected to it just to make sure.
That said, the voltage you are seeing on Vout seems to be close to the voltage I
see on mine.

Another thing to measure is the voltage on glcd pin 3 or Vo when the pot is wired up.
It should vary between Vout (which is negative) and up to whatever the other leg of the pot is connected
to (0 if gnd) and +Vcc if Vcc.

Every glcd is slightly different and the voltage for good contrast needed on Vo
will vary slightly depending on the glcd, the temperature, the viewing angle, and VCC.

For reference I just measured the voltages for one of my glcd setups.
I’m powering from USB so Vcc is about 4.8v
The Vout voltage is -4.7v

The Vo contrast voltage measured:
Above -1.5v you can’t see any pixels.
The pixels start to be visible at -1.5v
The pixels look pretty good at about -2.5v
At -3v and lower all the pixels are on.

What do voltages do you see on your Vo pin?
Can you get the voltage down to -2v or lower by rotating the pot?
Does it drop down to Vout or at least close to it when the pot is rotated all the way to one end?
(When that low all pixels should be on)
If not, then there is something wrong with the pot wiring
or the pot.

If you connect Vout directly to Vo all pixels should be on.

— bill

Hi,

thanks for your help, we managed to get it working.

First of all it was a light pixels on dark background display, so my mistake (FSTN Negative type - http://www.raystar-optronics.com/UserFiles/ProductImages/130828117801425123015.jpg)

Secondly, the pot we were using was broken, we changed to a new one and the image improved slightly.

And lastly, we used an external power supply and finally everything was viewable and works "silky smooth". It seems that the Arduino Mega 2560 board doesn't take enough power from the USB cable.

just a little question because I'm a little confused. In case of our display (light pixels on dark background) should we use the GLCD.init NON_INVERTED or INVERTED parameter?

the looks: https://www.dropbox.com/s/cz8f1daky6q5kh7/IMG_20130723_220430.jpg

Backlights for some of these glcds use a tremendous amount of current.
(I have one that wants up to 600ma)
It is likely that the backlight is drawing too much current for the Mega through the USB power.
Are you using any sort of current limiting resistor on the backlight?
Some need them and some don’t. If it needs one and you don’t use one,
it will work for a while and then eventually it will burn out the backlight.
I’d suggest measuring the backlight current and setting it to a few hundred milliamps.
I use a current limiting resistor even on backlights that don’t need them.
The backlight will be slightly dimmer but will use much less power.
The backlight that I have that wants 600ma looks a bit dimmer but still very readable
with a 4 ohm resistor which reduces the current down to about 250ma.

Good question on the INVERTED mode.
The current API really was designed and worded for displays that use black pixels on light background.
So the meanings of “INVERTED” and the colors “WHITE” and “BLACK” are a bit confusing
when using a reverse display (white pixels on dark background).
INVERTED isn’t used to reflect the mode of the display (white pixels vs black pixels) but rather to
invert all the pixels drawn on the display.

By setting INVERTED it reverses the color of the drawn pixels.
On a display that uses white pixels that means that when INVERTED mode is used
when you clear the screen all the pixels would be turned on for all the pixels turned off.
And when you draw a line you would get black pixels instead of white pixels.
NON_INVERTED mode which is the default mode means that the library
turns on the pixels to draw them. On a display with black pixels, a drawn pixel
will be black or on, on a display with white pixels the drawn pixels will be white or off.

Then there is a color option: “WHITE” or “BLACK”.
In the library “BLACK” means pixel on, and “WHITE” means pixel off.
Where this gets confusing is that if you have a white pixel display and run in the default mode
of “NON_INVERTED” and you draw a line using “BLACK” as the color
you will get a line of white pixels.
This is because “BLACK” means turn on the pixels and on reverse type display “on” pixels are white.

I know it is a a bit confusing, and I’d like to clarify it and perhaps even update the API and documentation
to be clearer and make the colors appropriate for the type of display.
I just haven’t gotten around to that.

The easiest way to deal with it or think about it is to run in the default mode
and not specify INVERTED or NON_INVERTED on the Init.
i.e. just use

GLCD.Init();

And then don’t specify the color when selecting fonts or drawing lines.
On white pixel display you will get white pixels as expected and on
black pixels you will get black pixels as expected.

If you ever have a need for reverse pixels, you have two options,
you can either put the entire display into INVERTED mode, which reverses everything,
or for selective areas, fonts, or graphics to be inverted you have to think in terms of a non reverse display in that
“WHITE” means black pixels and “BLACK” will mean white pixels as
“WHITE” means turn the pixel off and “BLACK” means turn the pixel on.

Does that clear things up?
If not, ask more questions and I’ll be happy to answer.

— bill

Hi, bperrybap and sateg, i have similiar issue that was killing me but i think i will sort it out with your good description of case(sateg) and good explanation of solution (bperrybap).

I would like to thank you.