Go Down

Topic: Graphic LCD display won't show anything (Read 1 time) previous topic - next topic

pyro-dragon

Feb 23, 2012, 11:31 am Last Edit: Feb 23, 2012, 03:05 pm by pyro-dragon Reason: 1
Hi guys!
Posted this in another thread in the troubleshooting forum but I thought this would be a mroe appropriate place.

I have an Arduino Mega 2560 with a Digitron SG12864j4 128x64 LCD. This conforms to the B pin layout in this article:
http://www.arduino.cc/playground/Code/GLCDks0108

I've not been able to make anything appear on the screen. Strangely enough, adjusting the contrast knob doesn't do anything to the screen either. The pixels remain the same shade.

I have checked the wiring with a multimeter and am satisfied that the connections have been made and the wires are going to the right places.

I'm using the 0023 version of the Arduino software with the GLCD library and have uploaded the example program. I have made the change from
#if defined(__AVR_ATmega1280__)
to
#if defined(__AVR_ATmega2560__)
in the code.

Is it possible that my LCD screen is faulty? What are the other things I can look into to try and crack this?

Thanks for any help!

EDIT: Thought I should include a link to my panels data sheet
http://www.digitron.com.hk/sg12864j.htm

bperrybap

You should not have to change anything in the library.
Make sure you are using glcd v3 rather than glcd/ks0108 v2.
glcd v3 includes a diag sketch which will help diagnose pin configuration and wiring issues.

--- bill

pyro-dragon

Hi Bill
I just tried using the v3 library. The wiring seems correct according to both the diagram provided there and the data sheet for the LCD panel. I ran the diagnostics program and it seems all tests have passed.
The screen is still blank however.

Here are the results of the tests:
Code: [Select]
--------------------------------------------------------------------
Reported Arduino Revision: 0.22
--------------------------------------------------------------------
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: 4
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): 19.13

bperrybap

The diag results indicate that the control wires and data wires are correct and the lcd
functioning properly.

That leaves the contrast circuit and the backlight.
How have you wired those?


Is it positive or negative type display?
(black pixels on light background or white pixels on dark background)


pyro-dragon

Its a positive display. The contrast is something that is concerning me, as I said, turning the contrast pot does absolutely nothing to the display. I would have thought there would be a change in the overall display even if there is nothing on it.

I have pin 18 connected to the right side of the pot, pin 20 connected to the left side. I also have a wire on the same breadboard line going to ground. Pin 3 is connected to the middle leg of the pot.
Is it worth providing a photo?

Also are the two grounds on the Mega board the same? I have them both connected.(One is connected to the pot, the other is connected to pin 1)

bperrybap

I didn't quite follow your connections.
Is pin 20 also connected to Arduino ground?

All the gnd connections on the mega should be the same.
The two grounds on the lcd are not.
They can be connected the same ground but they are independent.

What about the glcd reset pin?
How is that connected?

pyro-dragon


I didn't quite follow your connections.
Is pin 20 also connected to Arduino ground?

Yes, pin 20 is connected to one Arduino ground as well as one side of the pot.


All the gnd connections on the mega should be the same.
The two grounds on the lcd are not.
They can be connected the same ground but they are independent.

There are two ground sockets on the Mega and two grounds on the LCD panel. I have connected the different grounds on the LCD to different grounds on the Arduino.


What about the glcd reset pin?
How is that connected?

The reset pin is disconnected as per the pin chart.

bperrybap

Some lcds need their reset signal tied high and some need a pulse and some can work
when the reset signal is not attached.
Normally when the lcd is not getting the reset signal it wants diag fails.
Since diags is working, that is probably not it, but you may want to tie
it to vcc as a quick test.

To absolutely rule out a reset signal issue, it is best to use an Arduino pin to control reset.
You can enable this by editing the mega pin config file
in libraries/glcd/config/ks0108_Mega.h
look for the line that has glcdRES and uncomment it to enable that pin
to control the reset line on the glcd module.

Was the glcd ever miswired?
That can damage the Vee powersupply which means nothing will show up
as the lcd can't get its needed contrast voltage.

All the connections sound correct.
Are you sure the pot connections are all good?
What value pot are you using?

Can you measure the voltage on Vee (glcd pin 18) and Vo (glcd pin 3)?

They should be negative with respect to ground.

The voltage on Vo should vary when you turn the pot.

--- bill

pyro-dragon

Sorry for the long delay in reply. Something serious came up that i had to deal with.


Some lcds need their reset signal tied high and some need a pulse and some can work
when the reset signal is not attached.
Normally when the lcd is not getting the reset signal it wants diag fails.
Since diags is working, that is probably not it, but you may want to tie
it to vcc as a quick test.

To absolutely rule out a reset signal issue, it is best to use an Arduino pin to control reset.
You can enable this by editing the mega pin config file
in libraries/glcd/config/ks0108_Mega.h
look for the line that has glcdRES and uncomment it to enable that pin
to control the reset line on the glcd module.


Tried this to no effect.


Was the glcd ever miswired?
That can damage the Vee powersupply which means nothing will show up
as the lcd can't get its needed contrast voltage.


I did antecedently slot the LCD in offset by one pin once (20 connected in place of 19, 19 in place of 18, etc). However I was not getting any response out of the screen before an after that time.


All the connections sound correct.
Are you sure the pot connections are all good?
What value pot are you using?


10K


Can you measure the voltage on Vee (glcd pin 18) and Vo (glcd pin 3)?

They should be negative with respect to ground.

The voltage on Vo should vary when you turn the pot.

--- bill



I did measure a voltage across them. -0.25

bperrybap

#9
Mar 08, 2012, 11:25 pm Last Edit: Mar 08, 2012, 11:36 pm by bperrybap Reason: 1



Was the glcd ever miswired?
That can damage the Vee powersupply which means nothing will show up
as the lcd can't get its needed contrast voltage.


I did antecedently slot the LCD in offset by one pin once (20 connected in place of 19, 19 in place of 18, etc). However I was not getting any response out of the screen before an after that time.

I'm not sure what the effects of hooking it up that way might be.


Can you measure the voltage on Vee (glcd pin 18) and Vo (glcd pin 3)?

They should be negative with respect to ground.

The voltage on Vo should vary when you turn the pot.



I did measure a voltage across them. -0.25


So you are saying the voltage on both Vee and Vo is a constant -0.25
and the voltage on Vo does not vary when the pot is rotated?
Then either your wiring to the pot is bad, the pot is bad or the Vee power supply is smoked
from the earlier miswiring.

Can you post a clear closeup photo of how you have a the pot hooked up?
(I'm assuming that diags is still passing?)

What about the backlight? Do you have that wired up and is it on?
Are you using a current limiting resistor for the backlight?

--- bill

Go Up