Arduino mega 2560+ GLCD digitron SG12864j4

Hello!
Following the advice of bperrybap i start my own thread.
There Arduino Mega 2650 and a graphical LCD screen digitron SG12864j4(http://www.digitron.com.hk/sg12864j.htm).
I plugged it in just like in the manual(http://www.arduino.cc/playground/Code/GLCDks0108) Pinout B, found in the Arduino IDE library GLCD, uploaded an example ks0108example, but no data on the screen is not displayed, only the backlight is turned on.
I’ve uploaded GLCDdiags sketch, but no data on the screen is not displayed.
What could it be? The screen is faulty?

Here the data from the Serial Monitor:

Serial initialized

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)

It is hard to say but clicking that link brings up a page that says:-

The page "Code/GLCDks010" doesn't exist.

The bit you say is working is the backlight but I can't see a transistor in the photo and powering a backlight from an arduino pin is likely to damage the arduino due to drawing too much current.

This RESET timeout error means that the glcd library is initializing and after waiting what it thinks is "too long", the reset status on the glcd did not go away, meaning the module appears to be "stuck" reset. This is almost certainly due to a wiring error.

In the photo it is hard to tell where the wires go. I am assuming that pin 20 is on the left of the glcd module in the photo.

I do see that it looks like the red wire is the main ground and the green wire is VCC. While it doesn't really matter, normally the colors would be reversed for those signals.

The backlight wiring looks ok to me. A transistor is not needed when the backlight is wired up directly to power (which looks like they way you have it wired up) : I see ground from the module hooked to a power row on the breadboard which is hooked to Arduino ground via a red wire. and backlight power hooked through a resistor to a bread board power row which is wired to VCC on the arduino via a green wire.

One thing that looks odd is the orange wire (horizontal in the middle of the photo) going from the group of jumpers on the breadboard to the Arduino. What is that?

Things to check:

Is the 20 pin header soldered to the glcd module? (It's hard to see, but it doesn't look like it in the photo)

Are you sure that module pinout is for the display you have? Is there any kind of markings on the back of the glcd module to indicate a part number so that pinout can be verified with a real data sheet?

The critical signals that must be wired correctly to get past the RESET and BUSY status checks are: E, CS1,CS2, R/W, DI, D7,D6 (pretty much all of them but D0 to D5) From what I can see they appear to be wired correctly.

Beyond that, additional photos that show where the wires go would be helpful. From the current picture I can't make out for sure where all the wires are going. The tops of the wires were cut off and it is difficult to tell where the wires go as the black jumper header pin blends in with the black arduino header pins. It would also be helpful to be able to see the wires going to the potentiometer.

Note: To help others reading the thread, you might want to modify the link in the original thread Looks like the "8" got dropped on the end of the link to the playground page. --- bill

To help others reading the thread, you might want to modify the link in the original thread Looks like the "8" got dropped on the end of the link to the playground page.

Thanks! I modify this link!

about my problem. I reconnect the wires, so that was understandable and made additional photos. On the main photo pin 20 is located on the left. I photographed the back of the GLCD-module, and signed a contact in accordance with the datasheet. module has two lines of pins, Ch1 and Ch2. I used to connect the Ch1. On 19 pin - resistor to 220 ohm to +5v Main Photo:

more photos:

PS Sorry for bad english;)

What do you mean by:

elranon:
module has two lines of pins, Ch1 and Ch2. I used to connect the Ch1.

Are you meaning “CS1” and “CS2”? (I can’t see pins 15 and 16 in the photo)
You must hook up all 20 pins on the glcd module.

I asked this in reply #2 earlier but I’ll ask again:
In these photos it looks like the 20 pin header is not soldered to the glcd module.
Is the module simply resting on the 20 pin header?
If so, that will not work.
The 20 pin header must be soldered to the glcd module in order to get proper connections.

— bill

Hi all! I would like to return again to my problem with glcd.

Are you meaning "CS1" and "CS2"? (I can't see pins 15 and 16 in the photo) You must hook up all 20 pins on the glcd module.

I mean that from the back of the glcd is 2 lines of contact, called "CN1" and "CN2". I soldered 20 pin header to the module glcd, on "CN2" side(on screen)

Now, when the 20 pin header is soldered to glcd, GLCDdiag sketch displays:

Serial initialized
--------------------------------------------------------------------
Reported Arduino Revision: 1.1
--------------------------------------------------------------------
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
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): 20.3

BUT no data on the screen is not displayed :-( What is this? May be a bug somewhere in the glcd library, and we must fix any configs? Help me please, and sorry for bad english

It’s not a bug in the library.
If the diag sketch reports that it passes then all the control and data lines are hooked up properly
and the library and the glcd are communicating properly. This is very good.

If you don’t see any pixels and the backlight is turning on then it is contrast circuit.

Do you see any pixels if you rotate the contrast potentiometer?

How do you have the potentiometer hooked up?

one side should be hooked to ground
one side should be hooked to glcd pin 18
The center pin of the pot should be hooked to glcd pin 3.

— bill

Hi.
Yes, the potentiometer hooked up.
Backlight is turning on, but i don’t see any pixels on screen.
I think the the potentiometer is properly connected correct (on photo)

I can't tell anything from the photo. It doesn't show where the wires go. Can you show a fully photo of the current setup as well as a closeup of the pot?

It looks like a header was soldered to the glcd and then removed. Are you sure there are no shorts from left over solder?

A quick test to see if the contrast voltage circuit is working (Vee signal) is to remove the pot and connect Vee directly to the Vo input. Connect glcd pin 18 to glcd pin 3. When Vee is connected to Vo, all pixels will turn on. Make sure the diag sketch is running when you do this as the display still has to be initialized to turn on the lcd.

If you have a volt meter you can measure the voltage on the Vo input when the pot is installed. If it is a digital meter measure between Vo (pin 3 right up close to the glcd) and gnd. With the pot rotated one way, the voltage will be around -8 to -10 volts. With the pot rotate the other way the voltage will be very close to 0 volts.

--- bill