GLCD 128x64 with MEGA - showing only stripes

I have connected 128x64 glcd to Arduino MEGA following this .

When I use Pinout B, LCD shows only two big stripes (as image in attachement). GLCD.ClearScreen(); doesn’t work.
If I change connection to Pinout C, nothing shows (only light, no pixels). So I hope Pinout B is right connection.

I don’t have contrast pot/resistor connected. Can this fact cause the problem?

My LCD is this one: - there is also a datasheet.

I use glcd 3 library from .

My code is:

#include <glcd.h>
#include <fonts/allFonts.h>
#include <ks0108_Mega.h>

void setup() {
  GLCD.print("hello, world!");

void loop() {

Have you experienced similar problem?

Thank you for every hint!

EDIT - this is glcd 3 library test output:

Reported Arduino Revision: 1.0
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)
 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
GLCD initialization Failed: RESET wait Timeout (status code: 2)

The main problem is that display is not a ks0108. Based on the pinout, it looks like a st7920. While the st7920 and the ks0108 have similar electrical interfaces, (they are not the same - they do not have the same pins) st7920 uses a different command interface and its internal memory layout is different from a ks0108. The current glcd v3 library does not support the st7920.

The photos on the ebay listing are correct in that they seem to match the product you have. The "datasheet" provided in the listing is not for that glcd.

When looking at buying glcds on ebay always make sure you can match the datasheet pins to the photo or that you can locate a datasheet based on the photo. If you can't match up a datasheet to an actual photo in the listing, avoid that listing and move on.

You may want to have a look at the u8glib instead.,91395.0.html

--- bill