gLCD with unknown controller

Any general or miscellaneous queries that do not fit into the other forum catagories

Moderators: Benj, Mods

Post Reply
Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

gLCD with unknown controller

Post by Spanish_dude »

So one of my friends gave me this gLCD a couple days ago.
I'ts a PG12641D (REV:B) from DATA IMAGE.
Image

I searched google for a datasheet but didn't seem to find any.
While searching for a datasheet I came across this two webpages:
http://www.8051projects.net/lofiversion ... lease.html
http://blog.naver.com/PostView.nhn?blog ... listtype=0

In the first webpage you can see this image:
Image

And two or three messages after that image someone said that the gLCD is a 128x64 gLCD with a KS0108B controller.

In the second webpage (Korean) you can see this image:
Image

You can (or can't) read "Built-in controller KS0107 or equivalent".

Now my question are:
- How can I see if this gLCD has a KS0107 controller (or equivalent) or KS0108B ? (I suppose I can't because the chip is under that black thing that protects the chip)
- Are there any "big" differences between a KS0107 controller and a KS0108B controller ?
- Has anyone got a working program for a gLCD (128x64) with a KS0107 (or equivalent) and/or KS0108B controller ?

Thanks,

Nicolas

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: gLCD with unknown controller

Post by JohnCrow »

Hi Nicolas

Have a look at these posts

http://www.matrixmultimedia.com/mmforum ... =26&t=8020

We have both (independantly) been playing with a LCD that uses the KS0108 controller
For this board it is connected using I2C. There is a lot of information on the Byvac website
A serial driver is also available, along with the full datasheet for the controller

http://www.byvac.com

Your display rear view looks very similar to mine. (See data sheet on byvac site)

Ive also attached a couple of my simple test programs.
Display ASCII Character Set.fcf
(11 KiB) Downloaded 499 times
Display Text & Simple Fill Box.fcf
(9 KiB) Downloaded 489 times
Hope this gives you some pointers.
1 in 10 people understand binary, the other one doesn't !

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: gLCD with unknown controller

Post by Benj »

Yep looks like a KS0108 to me too.

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: gLCD with unknown controller

Post by Spanish_dude »

Thanks for the programs JohnCrow.
I hope these are Flowcode v3 files as I can't open v4 files :P.

If these are FCv4 files then could you upload the *.c files ?

Thanks ;)

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: gLCD with unknown controller

Post by JohnCrow »

OK no problem
Display ASCII Character Set.c
(16.19 KiB) Downloaded 428 times
Display Text & Simple Fill Box.c
(19.58 KiB) Downloaded 403 times
1 in 10 people understand binary, the other one doesn't !

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: gLCD with unknown controller

Post by Spanish_dude »

Oh that's right, that ByVac gLCD has a chip used to do some serial to parallel conversion.
I'll check the datasheet to see what that chip does with the data sent from the PIC.

EDIT:
Actually I'll check the KS0108 datasheet and see if I can make something of it.
Thanks anyway ;).

EDIT2:
Seems like mikroC has a KS0108 library.
Looks a bit too difficult to do it on my own :mrgreen: .

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: gLCD with unknown controller

Post by Benj »

Hello,

There is a custom version of a KS0108 component available from here.
http://www.matrixmultimedia.com/Flowcode_Components.php

It was written for v3 of Flowcode but if you have any problems using it with v4 then let me know.

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: gLCD with unknown controller

Post by Spanish_dude »

Thanks Benj.

Actually, I'm still using Flowcode v3 for PIC (but I do have a Flowcode v4 for PIC24 and dsPIC).
This will make things easier !

Nicolas

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: gLCD with unknown controller

Post by JohnCrow »

Hi Nicolas

I'll be interested to see if it works.
Not able to try it with my display as I dont really want to desolder the I2C driver board from it.
1 in 10 people understand binary, the other one doesn't !

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: gLCD with unknown controller

Post by Spanish_dude »

I'll post something when I get it done ;).
I managed to desolder all the pins. I need to find some DB-9 connectors to connect the display to the multrprogrammer board.

Once that's done, I can begin coding ^^.
I think I have some DB-9 connectors laying around, I'll do it this week-end if I'm not too lazy :lol: .

EDIT:

Benj, I just checked the link for the flowcode components. Is it normal that there's no theme or is that some bug with the code of the page ?

Nicolas

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: gLCD with unknown controller

Post by Spanish_dude »

Hi,

I'm making a sort of an e-block for the gLCD.
I'll use this to connect the gLCD to my board ("Connections To 8051 Board") : http://www.pjrc.com/tech/8051/board5/lc ... #schematic

I'm planning to do some sort of a patch like the e-blocks have. One for data bus and another one for the rest (CS1/2, E, ...)
Also, I think I'll add a pot + resistor to the A/K to make a variable backlight.

cheers

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: gLCD with unknown controller

Post by Benj »

Benj, I just checked the link for the flowcode components. Is it normal that there's no theme or is that some bug with the code of the page ?
No it probably shouldn't be like this, it is a page that seems to have fallen off our website, so I will check to see if this is correct.

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: gLCD with unknown controller

Post by Spanish_dude »

Hi Ben and John,

I soldered the last part of the board today, made every connection on the "patch"-like connectors.
Checked the connection with the readme file:
- PORTD is data (DB0 - DB7)
- PORTC is CS1, CS2, D/I, E, R/W

The reset pin is connected to a 1,6k resistor to Vcc with a capacitor of 10µF to GND.
Vo pin (3rd one) is attached to the middle pin of a 25k pot. The remaining pins of the pot are connected to GND and Vee (pin 18).

The SUB-D 9 connector (male) to PORTD:
I'm guessing pin 1 of the connector is connected to RD0 of the microcontroller so I attached the connector like this :
DB0 -> PIN1 -> RD0
DB1 -> PIN2 -> RD1
DB2 -> PIN3 -> RD2
DB3 -> PIN4 -> RD3
DB4 -> PIN5 -> RD4
DB5 -> PIN6 -> RD5 // pin beneath pin1
DB6 -> PIN7 -> RD6
DB7 -> PIN8 -> RD7
GND -> PIN9 -> GND

The SUB-D 9 connector (male) to PORTC:
CS1 -> PIN1 -> RD0
CS2 -> PIN2 -> RD1
D/I -> PIN3 -> RD2
R/W-> PIN5 -> RD4
E-> PIN4 -> RD3

Applying 5V to the board and setting the backlight jumper turns the backlight on (that's one thing working :P).

I then compiled the LCD Print Test.fcf (without error/warning) and programmed a 16F877A as selected in the "target".
I changed the XT to 4MHz because I couldn't find the ~19MHz XT :mrgreen: .
I did copy (and backup) and paste the Custom_Code.c into the appropriate Flowcode folder.
Unfortunately, it doesn't work. I turned the Contrast pot from 0% to 100% and nothing appears on the gLCD.

Am I doing something wrong ?
If my explanation of how I connected the gLCD to PORTC & PORTD isn't clear enough I'll make a schematic.

Nicolas

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: gLCD with unknown controller

Post by Spanish_dude »

I checked the connections, and all seems to be ok.

I have a 2 channel scope.
Any ideas what I should look at first ? Enable line, CS1/2 ... ?

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: gLCD with unknown controller

Post by JohnCrow »

Hi Nicolas

Looks like you are trying to program the display directly from flowcode (in the same way as the standard e-block lcd)
The one im using has a seperate driver board so it is driven using the I2C component.

Ive not tried using it the way you are describing, so not able to say if you have problems with the way its connected.
1 in 10 people understand binary, the other one doesn't !

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: gLCD with unknown controller

Post by Spanish_dude »

Hi John,

My gLCD doesn't have an additional (I²C) driver, so I'm using Benj's KS0108 Custom Code component.
I'll see if I can work on it tomorrow.

Nicolas

Post Reply