Please help QC12864B with Arduino Mega2560

I run GLCDdiags, the LCD not display. The GLCD initialization Failed "GLCD initialization Failed: RESET wait Timeout (status code: 2)"

===========================
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: 45
Initializing GLCD
GLCD initialization Failed: RESET wait Timeout (status code: 2)

=======ks0108_Mega.h===============
//
/
Configuration for assigning LCD bits to Arduino Pins /
/
/
/*

  • Pins used for Commands
    */
    #define glcdCSEL1 33 // CS1 Bit
    #define glcdCSEL2 34 // CS2 Bit
    #define glcdRW 35 // R/W Bit
    #define glcdDI 36 // D/I Bit
    #define glcdEN 37 // EN Bit

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

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

/*

  • Data pin definitions
  • This version uses pins 22-29 for LCD Data
    */
    #define glcdData0Pin 22
    #define glcdData1Pin 23
    #define glcdData2Pin 24
    #define glcdData3Pin 25
    #define glcdData4Pin 26
    #define glcdData5Pin 27
    #define glcdData6Pin 28
    #define glcdData7Pin 29

// Reset Bit - uncomment the next line if reset is connected to an output pin
//#define glcdRES 30 // Reset Bit

#endif //GLCD_PIN_CONFIG_H

Please help me to solved this problem.

GLCDv3 has not been supported for around 4 years now and has reached end of life.
More about this in the first post of this thread:
http://forum.arduino.cc/index.php/topic,56705.0.html

I'd recommend having a look at openGLCD:
https://bitbucket.org/bperrybap/openglcd/wiki/Home

--- bill

Thanks for your information.

I will try!

I am using openGLCD and still have error, what problem with me?:

Lib Configuration: openGLCD ver: 1.0rc2 build: v1.0rc2
Panel Configuration:ks0108-128x64
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
Backlight:

Diag Loop: 1
Initializing openGLCD
GLCD initialization Failed: RESET wait Timeout (status code: 2)
Test Count: 0 PASSED 1 FAILED

Unless the actual glcd has an issue (which is not very common), this issue is due to a pin/wiring issue.
This could be from things like:

  • incorrect wiring
  • poor connections at connectors or soldering
  • broken wires

However, The first thing is to verify the wiring which requires a datasheet for the glcd module you are using.
Every pin must be hooked up properly.

Have you verified that you have correctly wired up the all the arduino pins to the proper glcd pins by using the glcd datasheet?

If I look for a QC12864B display I found glcd modules that use the ST7920 chipset and not the ks0108 chipset
so I’m not sure what glcd you have or how you have wired it up.

The ST7920 and the ks0108 chipsets are very different.
The chipsets use different signal pins with different names, and how they work is also very different.
There is no way to wire up a ST7920 to use a ks0108 interface or library.

At the current time the openGLCD library does not support the ST7920 chipset.
If you do have a ST7920 based glcd, then you could look at using Oliver’s u8glib which does support that chipset.
https://code.google.com/p/u8glib/

— bill