Arduino GLCD Error: Blank Screen

Hi,
I want to Control GLCD using Arduino UNO

I uploaded GLCD demo code from glcd library Google Code Archive - Long-term storage for Google Code Project Hosting.

Pin Connections:

5V	5V	
Gnd	Gnd	
Pot    Vo (Contrast in)
8	D0
9	D1
10	D2
11	D3
4	D4
5	D5
6	D6
7	D7
14 (alog0)	CSEL1
15 (alog1)	CSEL2
Reset	 	Reset	
16 (alog2)	R_W
17 (alog3)	D_I
18 (alog4)	EN
Gnd   GLCD pin 18
+5V	Backlight +5
Gnd	Backlight Gnd
Serial initialized
--------------------------------------------------------------------
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-Arduino
--------------------------------------------------------------------
GLCD:ks0108 DisplayWidth:128 DisplayHeight:64
Chips:2 ChipWidth:64 ChipHeight:64
 CSEL1:14(PIN_C0) CSEL2:15(PIN_C1)
 RW:16(PIN_C2) DI:17(PIN_C3) EN:18(PIN_C4)
 D0:8(PIN_B0) D1:9(PIN_B1) D2:10(PIN_B2) D3:11(PIN_B3)
 D4:4(PIN_D4) D5:5(PIN_D5) D6:6(PIN_D6) D7:7(PIN_D7)
Delays: tDDR:320 tAS:140 tDSW:200 tWH:450 tWL:450
ChipSelects: CHIP0:(14,0x1, 15,0x0) CHIP1:(14,0x0, 15,0x1)
Data mode: 
 d0-d3:nibble mode-Non-Atomic
 d4-d7:nibble mode-Non-Atomic
--------------------------------------------------------------------
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
 Verify error: (2,0) 8A!=89
 Verify error: (3,0) 8B!=89
 Verify error: (5,0) 8D!=8C
Vertical Page Test Chip: 0 Pixels 0-63
 Verify error: (56,0) CA!=D1
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): 17.28

Arduino Config:

#define glcdData0Pin        8
#define glcdData1Pin        9
#define glcdData2Pin        10
#define glcdData3Pin        11
#define glcdData4Pin        4
#define glcdData5Pin        5
#define glcdData6Pin        6
#define glcdData7Pin        7

/* Arduino pins used for Commands
 * default assignment uses the first five analog pins
 */

#define glcdCSEL1        14
#define glcdCSEL2        15

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

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

#define glcdRW           16
#define glcdDI           17
#define glcdEN           18
// Reset Bit  - uncomment the next line if reset is connected to an output pin
//#define glcdRES          19    // Reset Bit

#endif //GLCD_PIN_CONFIG_H

My GLCD: RAYSTAR OPTRONICS RG12864A-YHY-X
Datasheet: http://dac.ge/pdfs/16/04809.pdf

GLCD is only showing blank screen

How to fix this?

The good news is that since the diags passed, that all the connections
between the the glcd and the Arduino are correct and the display is working.

That doesn't leave much that can cause issues.

  • backlight connections
  • contrast circuit connections.

When you say "Blank Screen" what does that mean?

  1. Is the backlight working?

  2. Are the pixels showing up?

  3. Can you describe how you have the contrast pot wired up?
    Did you wire it up according to the datasheet or according to
    the documentation that comes with the library? - I'm curious.

I've seen many many ks0108 datasheets (many have errors in them),
This one has a few things that I've not yet seen.

The datasheet shows that pin 18 (normally the negative voltage output for contrast)
as "NC" vs Vee or Vout on most other displays.
Normally "NC" means "Not Connected",
However on page 7 of datasheet there is a block diagram that shows
a block labeled "N.V. Generator" going to Vout.
Also the pot in the diagram on the page is mis wired.
I'm guessing that the display works like pretty much all the others
in the pin 18 is really the Vout/Vee signal.
And that they screwed up the labeling and probabaly meant "NV" instead of "NC"
and that they also screwed up their contrast example and should have wired up
the other leg to the "Vout" signal in the diagram pin rather than not connecting it.
I'm assuming that the "Vout" signal is actually connected to the pin labeled "NC".

In order to diagnose the issue, can you provide additional information
on the 3 questions above?

--- bill

  1. Yes Backlight is Working
  2. No, pixels arent showing up
  3. I connected one pin of pot to ground and other pin to +5V and I connected middle pin to Vout. That Circuit worked on normal 8x2 and 20x4 LCD displays
  4. I tried connecting Vout to Pin 18 but Pixels arent showing up

GLCD is only showing blank screen

How to fix this?

The data sheet (page 13) shows that the supply voltage for the LCD (pin 3) should typically be about 9.1 volts below the supply voltage for the logic (5 v). This would mean that the voltage at pin 3 should be about - 4.1v with respect to GND. Typically there is a negative voltage available at pin 18 in which case you would connect the ends of your potentiometer to pins 18 and GND with the wiper on pin 3. In your case you will have to provide your own negative supply for one end of the potentiometer.

Don

Gigi10012:

  1. Yes Backlight is Working
  2. No, pixels arent showing up
  3. I connected one pin of pot to ground and other pin to +5V and I connected middle pin to Vout. That Circuit worked on normal 8x2 and 20x4 LCD displays
  4. I tried connecting Vout to Pin 18 but Pixels arent showing up

But you are not using a "normal 8x2 and 20x4 display".
The documentation for the library is very clear on how to hook up the pot.
It specifically states in several places not to hook it up as you described in #3
On both the ks0108 playground wiki and the included HTML documentation
there is a specific paragraph about how to hook up the pot.
I highly recommend the HTML documentation as it contains much more information
than the wiki including information on the diags tool and information on all
the API functions.

On #4 I'm not sure what you hooked up since
on your datasheet:
There is no pin labeled Vout
Pin 18 labeled "NC"
Vo is Pin 3

On most ks0108 modules,
Vout is normally Pin 18

Are you saying you hooked up pin 18 to pin 13 as a test?

What isn't clear on your data sheet is if Vout exists or not.
All the pinout diagrams say pin 18 is "NC" which typically means "not connected",
but then the block diagram page 7 shows a Vout signal on the module.

There are a few ks0108 modules out there that do not provide Vout

To know for sure, my suggestion would be to
measure the voltage between ground and pin 18 on the module
and see if there is a voltage there. If it is like most ks0108 modules,
you will see a negative voltage of around -6 to -8 volts.

You could also try hooking up the pot correctly to see if works,
but since your datasheet seems to conflict it self, if doesn't
"just work" when the pot is correctly hooked up, I'd definitely
recommend measuring the voltage on pin 18.

If Vout is not present on pin 18,
as Don mentioned you will have to create your own negative voltage.
Creating a negative voltage is kind of pain. It requires extra circuitry or using
another power supply.
Depending on your situation, it might be easier to get another display.

But again, if it isn't working, the only way to know for sure about pin 18
is to measure the voltage on pin 18.

--- bill