Pages: [1]   Go Down
Author Topic: Connection of ks0108 chip LCD  (Read 1739 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not sure of the pin connections.

I guess my LCD is of type B. That's what I assume comparing the pin connections show in playground/glcd.

My data sheet from the vendor shows me the following connections

Pin Connection
Pin   Symbol   Level   Function
1   Vss   0V   Ground/N/V
2   Vdd   5.0V   Power Supply(0V)
3   Vee   0V ~ -8V   Power Supply for LCD Driver
4   RS   H/L   Register Select
5   R/W   H/L   Read/Write
6   E   H/L   Enable
7   DB0   H/L   Data Bus Line
8   DB1   H/L   Data Bus Line
9   DB2   H/L   Data Bus Line
10   DB3   H/L   Data Bus Line
11   DB4   H/L   Data Bus Line
12   DB5   H/L   Data Bus Line
13   DB6   H/L   Data Bus Line
14   DB7   H/L   Data Bus Line
15   CS1   H   Chip Select
16   CS2   H   Chip Select
17   /RST   L   Reset
18   Vout   -10V   Voltage
19   LED+   +5V   Power Supply for LED B/L (5V)
20   LED-   0V   Power Supply for LED B/L (0V)

The confusion is that it says pin 18 is Vout and pin 3 is Vee
According to the Arduino Playground, I'm supposed to connect Vee(pin 18) to one leg of 10k pot. (Other leg to ground)
and Vout(pin 3) to the wiper.

It looks like the pin symbol given in my datasheet is reversed. i.e. Vout is pin 18 and Vee is pin 3.


Since ks0108 is a standard chip(of course there are 4 types, which doesn't make much difference) I'm not sure which one to follow.

Please help me get this right. Thank you.

This is the LCD I bought http://robokits.co.in/shop/index.php?main_page=product_info&cPath=14_24&products_id=183

Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 75
Posts: 7303
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Your liquid crystal display requires a contrast voltage somewhere between Vout and GND, so -10v to 0V. You can get it if you use a potentiometer with two far legs on Vout an dGND. Then middle leg can go anywhere between -10 and 0 so you can adjust your contrast. I hope this helps.
Logged


Western New York, USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 4435
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The confusion is that it says pin 18 is Vout and pin 3 is Vee
According to the Arduino Playground, I'm supposed to connect Vee(pin 18) to one leg of 10k pot. (Other leg to ground)
and Vout(pin 3) to the wiper.

It looks like the pin symbol given in my datasheet is reversed. i.e. Vout is pin 18 and Vee is pin 3.

"According to the Arduino Playground" is not enough information to make sure that someone who is attempting to help you can find the specific information that you are trying to decipher.  

You haven't really identified your display and your transcription of the information from your data sheet appears to be inaccurate as well, so a link to that datasheet would help straighten that part out.
Oops - I missed that part.

Here's a simplified explanation using generic terminology which may help:

Most  character mode LCDs require a small positive voltage at pin 3 and this voltage is derived from a voltage divider, in the form of a potentiometer, that is driven from the same +5v power supply that is supplying power to the controller chip (pins 1 and 2).

Most graphical LCDs require a negative voltage at pin 3 and since a negative supply is frequently not readily available they provide one on the pc board, typically at pin 18.  This is a fixed supply voltage from which you can derive the required voltage for pin 3 via a voltage divider, in the form of a potentiometer.  In the previous post liudr has described how this is done.  Using the generic terminology you connect the ends of the potentiometer to pins 0 and 18 and you get your required negative voltage for pin 3 from the center (wiper) of the potentiometer.


Don
« Last Edit: October 31, 2012, 12:05:14 pm by floresta » Logged

0
Offline Offline
Shannon Member
****
Karma: 220
Posts: 12682
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Also look at the datasheet for the display, it shows how to wire up the potentiometer in section 3.4
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The datasheets and the details of the display can be found in the link I mentioned above.

As liudr said, does Vout give out a -10V?

In that case, I get it. I need to connect far end legs of the pot to Vout and GND viper to Vee

It also says Vee level is 0 ~ -8V. If the wiper is at the extreme end of -10V level then Vee will hav a -10V. Hence there needs to be a limiting resistor I'm guessing?
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 75
Posts: 7303
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hence there needs to be a limiting resistor I'm guessing?

No, just turn the potentiometer until you see text or a whole screen of black dots.
Logged


Western New York, USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 4435
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
It also says Vee level is 0 ~ -8V. If the wiper is at the extreme end of -10V level then Vee will hav a -10V.
That is the voltage you can expect to measure after you have adjusted the potentiometer to give a good display.

The actual voltage rating is shown in the chart at the bottom of page 3 of your data sheet where it says:

Supply Voltage(LCD)     VDD-VO     Max = 19V

This means that the maximum voltage you can have at pin 3 is 19 volts less than you have at pin 2.  Since pin 2 is at +5 volts then pin 3 can go no lower than -14 volts.

Isn't it nice that they call the voltage at pin 3 VO in some places and VEE or Vee in others?


Don
« Last Edit: October 31, 2012, 01:50:16 pm by floresta » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok. I think I'm clear with it now.

One leg of pot to pin 18, another to GND. And wiper to pin 3.
So negative voltage on pin 3 decides LCD contrast, which is supplied by pin 18.

Hope there's nothing wrong in what I've said. Correct me if I am.

Thanks everyone..  smiley (Still wondering why they mix Vee and Vo   smiley-confuse)
Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2762
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The confusion is that it says pin 18 is Vout and pin 3 is Vee
According to the Arduino Playground, I'm supposed to connect Vee(pin 18) to one leg of 10k pot. (Other leg to ground)
and Vout(pin 3) to the wiper.

There seems to be some confusion over pin 3 and some symbol names.
Pin 3 is Vo and Vo != Vee

You are misreading the datasheet and the ks0108 playground text and tables.
The datasheet and the ks0108 playground page are actually in agreement on pinout and pot wiring.

Pin 3, often called Vo is an input not an output.
The voltage presented on pin 3 controls the contrast for the glcd.
(The datasheet linked to on the product page you provided  calls pin 3 Vo
not Vee as you listed in your pinout table- See pages 3 and 6 of the datasheet)

Pin 18 is often called Vee (on your datasheet pin 18 is called Vout)
but it is same signal/function as Vee.
I apologize for an error in the panel type C note on the playground page.
Somebody typed in Vee for pin 3 instead of Vo. That is an error and is wrong.
However, the table and the contrast pot wiring on the playground page are correct.
(I'll go fix that Vo/Vee error and update the table to reflect the name Vout can
also be used on pin 18 as well)

The pot wiring is variable voltage divider that varies the voltage being fed
into Vo (pin 3 the contrast voltage input).

The pot wiring on page 6 of datasheet is the same as the pot wiring on
the ks0108 playground page and the included glcd documentation.

I think the confusion was that pin 3 was Vee which is incorrect.
Pin 3 is really Vo (contrast in) and on your datasheet Vee is called Vout.

--- bill
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for clearing that Bill. smiley
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 4435
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
There seems to be some confusion over pin 3 and some symbol names.
Pin 3 is Vo and Vo != Vee

You are misreading the datasheet ...
...
(The datasheet linked to on the product page you provided  calls pin 3 Vo
not Vee as you listed in your pinout table- See pages 3 and 6 of the datasheet)
He may not have been misreading the datasheet, he could have been reading the pinout table on the product page.  That is what I was referring to when I said "Isn't it nice that they call the voltage at pin 3 VO in some places and VEE or Vee in others?".

Quote
I apologize for an error in the panel type C note on the playground page.
Somebody typed in Vee for pin 3 instead of Vo.
They could have been looking in the same (or some similar) place.  

That's why I feel it best to use pin numbers when you can (as on the character mode LCDs) and complete pin names when you can't.  If you have to use shortened symbolic names because of multiple references it probably would be best to identify them with complete names the first time they are used.


Don

[Edit]  I just looked at some random character mode LCD data sheets.  These devices don't have a negative supply or a pin 18 but pin 3 serves the same function as it does on the GLCDs.  Most datasheets showed pin 3 labeled as VO, but there was at least one where it was labeled as Vee.
« Last Edit: November 01, 2012, 09:18:28 am by floresta » Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2762
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

He may not have been misreading the datasheet, he could have been reading the pinout table on the product page.  That is what I was referring to when I said "Isn't it nice that they call the voltage at pin 3 VO in some places and VEE or Vee in others?".
You know. I totally missed that.
I always go straight to the actual datasheet.
Quote
That's why I feel it best to use pin numbers when you can (as on the character mode LCDs) and complete pin names when you can't.  If you have to use shortened symbolic names because of multiple references it probably would be best to identify them with complete names the first time they are used.[/color]
Totally agree. The table on the playground page and the included glcd documentation
have a column called "Function" which is the actual glcd function for a given glcd pin.

My actual preference would be to use the datasheet and the board pin #s from the table
or the glcd library pin config file rather than the panel types.
Make the board pin#s or preferably the pin config file pin functions match the datasheet and you are golden.
Michael (the other library author) thought it was a bit too complicated to do it that way
and created the Panel types.
The Panel types do help the extreme newbies but it does create some other issues
since it doesn't promote any sort of understanding of what is really being hooked up
and how the pins for the library are configured.


Quote
[Edit]  I just looked at some random character mode LCD data sheets.  These devices don't have a negative supply or a pin 18 but pin 3 serves the same function as it does on the GLCDs.  Most datasheets showed pin 3 labeled as VO, but there was at least one where it was labeled as Vee.
I see many errors on product pages/ebay-pages.
Sometimes the lcd being sold is not the lcd in the photo. I see that quite a bit for glcds.
Or sometimes the datasheet linked to is for the correct type of module (ks0108 etc.. ) but not
the exact module being sold - which may have a different pinout.
I've also seen a good percentage of the hd44780 and ks0108 datasheets with errors on them.
Often fairly minor but sometimes they don't even have the pinouts correct which makes things really tough.

--- bill
« Last Edit: November 01, 2012, 09:39:40 am by bperrybap » Logged

Pages: [1]   Go Up
Jump to: