***Fixed*** Ks0108 128*64 -> no gfx showing + pictures Atmega 2560


This problem is fixed. If you have/had the same "problems" like me read this topic carefully and get it right before you take apart your lcd and break it :stuck_out_tongue:


My 128*64 display:

The connections:

How i connected it to my arduino mega:

What happens when i do a test sketch:

Screen glows blue ( is on) and pot meter for contrast works
but when i do a test it does not show any gfx even after i reset my arduino.

(just screen turns on but nothing happens further)

I tryd the GLCD lib on the arduino website , and also the (beta) on the arduino forum.
Please help me to get this working ... i want my lcd to work properly.

Pictures are too big on the post.

Did you connect the LCD reset pin to the MEGA reset pins? You didn't mention it. It needs to be connected.

Please post a useful picture with connections between the display and the MEGA.

Post link to example sketch you loaded.

You have not connected your contrast pin correctly. The pot goes between pin 18 and ground and the wiper of the pot goes to pin 3.

Don

I have a HUGE monitor so photos are ok for me... :smiley:

First, go get the latest glcd v3 library s/w from the google code site: (It is currently RC2)
http://code.google.com/p/glcd-arduino/downloads/list

The v3 beta code did not have 2560 support.

Then closely look at the included HTML documentation in the library about wiring.
(see the section: Wiring/KS0108 Family - but focus on the diagrams rather than the table)

You have a few wiring errors, one of which might damage the glcd backlight depending on
the glcd module.

All your glcd data and control lines look ok. It is the contrast pot and the backlight
that look incorrect.

If you are sure that your glcd does not need a current limiting resistor for
the backlight then you are ok but,
many GLCDs need a current limiting resistor on the back light.
If yours does and you do not use one, you will soon burn out the backlight.

I can see where there is some confusion about the contrast pot.
The wiring table is a bit unclear about how to wire up the contrast pot.
The wiring diagrams are correct but the table is unclear.
The comment in the table about the VO (contrast out) line is confusing.

The 10-20k pot should be hooked up as follows:
1 leg to VEE
Wiper to VO
1 leg to +5v
(diagrams in the library show ground and that should work but many data sheets actually show using +5v
to one of the legs vs ground)

I'll update the documentation for the next release to be clearer.

Run the diags example sketch to verify everything. If it still isn't working.
Post back with the serial output of the diags.

--- bill

The 10-20k pot should be hooked up as follows:
1 leg to VEE
Wiper to VO
1 leg to +5v
(diagrams in the library show ground and that should work but many data sheets actually show using +5v
to one of the legs vs ground)

Bill - you are a lot more familiar with the GLCDs than I am. Do any of them actually require a positive voltage on the contrast pin? If the answer is yes then the pot should be connected as you suggest, between VEE and +5V. If they all require a negative voltage then your method will still work - but mine, with the pot connected between VEE and GND, will allow finer adjustment.

Don

Don,
I don't think they do. I'm not sure why they recommend that configuration on their data sheets but many do.
Using ground seems to work just fine. In fact Michaal (orginal ks0108/glcd author) always wires his up that way.
But maybe it depends on the temperature and if the temperature is really cold or really warm perhaps
the voltage need changes enough to need a positive voltage.

Using ground vs +5v should also save a bit of power as well.

I got curious so I just went back and looked at several data sheets:

The ks0108 samsung data sheet says that the voltage should be
<= VDD and >= VEE
(between VDD and VEE,.... not that helpful)

So I looked at the 17 data sheets I had handy.
to see how they recommended wiring up the pot

  • 10 of them used +5v
  • 1 of them used ground
  • 4 of them didn't specify
  • 1 of them was totally bogus and their wiring wouldn't work.

From reading a few, it wasn't clear what the reference is.
Some appear to reference the voltage between VDD and VO as the voltage.
Most dont' specify.

Since most show needing voltages of about 9 to 10 volts, it wouldn't much matter if ground was used
on one leg since you need much more than 5 volts to make it work.

But then some show voltages as high as 14 volts at very high temperatures 50+ up to 70C.
and the only way to get that is if VDD were used, assuming VEE is -10v.

(but one data sheet showed VEE as -19 volts)

And one data sheet showed Vee as -5 volts (probabaly used a voltage doubler to get it).

So basically, I have no idea. It may actually depend on the glcd and the temperature.

I always just wired mine according the data sheet that came with it and it showed using +5v.

But I bet, that ground will probably work in nearly all if not all cases, at least at room
temperature.

--- bill

the glcd diagnostic proggy:

Serial initialized

Reported Arduino Revision: 22

GLCD Lib Configuration: glcd ver: 3 glcd_Device ver: 1 gText ver: 1
GLCD Lib build date: Sat 04/23/2011 15:01:49.03
GLCD Lib build number: 421
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

screen:

Wiring: (following to forum post)

When the diagnostics stops with "Initializing GLCD" it means the initialization code is not
ever seeing the GLCD as "ready". This can be caused by many things but usually is due
to incorrect wiring.

I can't see where most of the wires really go but I do see some things that look
incorrect.

If I look at your photos, the 2nd photo in the thread (of the back of the board) shows
pin 1 on the left and pin 20 on right.
When you plug in the glcd module into the breadboard,
Pin 1 will now be on the right and pin 20 on the left.

Now if I look at you most recent photo of the GLCD and the mega, it appears that all
the wiring is backwards. My guess is that the glcd pin numbers were all transposed.

I base this on looking at a few signals & pins.
The green wire coming from the reset signal on the mega is going to a glcd pin near the right edge of the glcd module.
The reset line on the GLCD is pin 17 which is near an edge, but pin 20 is on the left side of the glcd module not the right.
Also looking at another signal, the orange wire coming from mega pin 34. This is CSEL2 which is glcd pin 16 which
should be closer to the pin 20 edge. Since pin 20 should be on the left, this orange wire
should be closer to the left side of the glcd module but it is closer to the right side.

Take a close at your wiring and how it hooks up to the glcd module and where
pin 1 vs pin 20 are when the board is flipped over and plugged into the bread board.
I'm guessing that the pin number ordering was reversed so all the wiring was incorrect.

I also didn't see a current limiting resistor on the backlight.
Are you sure your backlight does not need one?

--- bill

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): 17.59
--------------------------------------------------------------------
Reported Arduino Revision: 22
--------------------------------------------------------------------
GLCD Lib Configuration: glcd ver: 3 glcd_Device ver: 1 gText ver: 1
GLCD Lib build date: Sat 04/23/2011 15:01:49.03
GLCD Lib build number: 421
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
--------------------------------------------------------------------

Got it workin!!!
I switched all the wires and hooked up the wires like said in this topic and finally found the datasheet of my lcd ( http://www.satistronics.com/myfiles/file/LCD/RT12864J-1.pdf )
To bad i broke my lcd ... LOL
i "broken" the pcb wire to pin 18 ... on the pcb itself , it is fixable =)
i took apart the top of the lcd and not all dots were appearing this is wat i can't fix ....

Guess i buy a new lcd screen and post the results here :stuck_out_tongue:

Glad the library is now working for you.
That data sheet shows using gnd on the pot leg vs +5v.

(I added it to my collection)

--- bill

if you use +5V instead of GND there will be smoke out of the lcd :stuck_out_tongue:

spikee:
if you use +5V instead of GND there will be smoke out of the lcd :stuck_out_tongue:

Huh? I'm not sure what you are thinking.

I am talking about what connects to the pot leg.

There was earlier discussion in this thread that Don brought up, about what is opposite VEE on the pot.
Should it be +5v or GND? That was the question.
My response was that ground should work but nearly all the glcd data sheets show using +5v
which is why I recommended wiring up the to pot leg to +5v vs ground like the glcd documentation
shows.

The data sheet that you posted a link to shows using ground on the pot leg.

If this is not clear or you are not understanding this, please ask more questions.

--- bill

I also have the Satistronics 128x64 GLCD screen. Everything worked for me except I have to use a 1M ohm pot for contrast. 20K was not sufficient. The impedance of the pot after correctly adjusting it is 680k ohms. My pot is connected from pin 18 (VEE), wiper to pin 3 (contrast), and the 3rd leg is connected to GND (0v). Not sure why 20K doesn't work for me but it's no biggie. I only post this in case someone else has a similar problem.

20K was not sufficient.

The 20 K pot was either defective or it was not connected properly. The overall resistance of the pot has essentially no effect on whether it will work for this purpose or not.

Don

floresta:

20K was not sufficient.

The 20 K pot was either defective or it was not connected properly. The overall resistance of the pot has essentially no effect on whether it will work for this purpose or not.

Don

I agree, I tend to think the 20 K pot may be bad too. A possible scenario to have broken it is to have connect top pin to 5V and the middle pin to GND, while the wiper is very close to the top, literally having a few ohms between 5V and GND. That could exceed the power rating of the pot and burn the internal "wire" open, resulting in a bad pot. Does the above speculation make some sense to someone?