Pages: [1]   Go Down
Author Topic: How do I drive a JHD 162A LCD display?  (Read 3696 times)
0 Members and 1 Guest are viewing this topic.
Northern California (by San Francisco)
Offline Offline
Sr. Member
****
Karma: 3
Posts: 258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was given a JHD 162A LCD display, but no chip to drive it. I want to hook it up to my Arduino and display characters on it. But I guess I need something in between the Arduino and the 16 parallel input lines to the display. What do people normally use?

I've looked on Google, but am not finding anything, so I'm not sure if I'm looking for the right thing.

EDIT: I found a datasheet that says to use a LSI K0066 or equivalent, but I cannot find out anything about those.
« Last Edit: September 03, 2011, 08:18:06 pm by Daanii » Logged

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

Quote
I've looked on Google, but am not finding anything, so I'm not sure if I'm looking for the right thing.
What did you search for?  I copied the phrase 'JHD 162A LCD' from your post, pasted it into Google (US version) and got all kinds of information.

Where did you get the information about the 'K0066' controller?  That doesn't look right.

Have you tried the LiquidCrystal library?


Don
Logged

Northern California (by San Francisco)
Offline Offline
Sr. Member
****
Karma: 3
Posts: 258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your post. The LiquidCrystal library and some related posts on this forum did give me what I was looking for.
Logged

Northern California (by San Francisco)
Offline Offline
Sr. Member
****
Karma: 3
Posts: 258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Everything works fine with the LCD display now. Some of your previous forum posts were also helpful.

Only one thing I cannot figure out with the Liquid Crystal Library. I want to use some of the Japanese Katakana characters, but they don't seem to print correctly. If I do lcd.print("ノリコ"); for example, the display shows something else. Do you know how to output those characters?

UPDATE: I found out I can use lcd.write(xxx); and then put in for "xxx" the number for each Japanese character from this chart: www.fauxfu.com/documents/serLCD_ascii_jp.pdf. That's inconvenient, but I cannot find an easier way.
« Last Edit: September 03, 2011, 11:38:20 pm by Daanii » Logged

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

Quote
I found out I can use lcd.write(xxx); and then put in for "xxx" the number for each Japanese character from this chart: www.fauxfu.com/documents/serLCD_ascii_jp.pdf. That's inconvenient, but I cannot find an easier way.
If you can look up the values in a chart and substitute them manually then it should be possible for this substitution to be done by a computer.  I'm not sure of how to do this, possibly with an 'h' file, but I'm sure someone with more C programming experience can help.

Don
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6619
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Everything works fine with the LCD display now. Some of your previous forum posts were also helpful.

Only one thing I cannot figure out with the Liquid Crystal Library. I want to use some of the Japanese Katakana characters, but they don't seem to print correctly. If I do lcd.print("ノリコ"); for example, the display shows something else. Do you know how to output those characters?

UPDATE: I found out I can use lcd.write(xxx); and then put in for "xxx" the number for each Japanese character from this chart: www.fauxfu.com/documents/serLCD_ascii_jp.pdf. That's inconvenient, but I cannot find an easier way.

These LCD displays use an 8-bit character set, not Unicode. The upshot is that in order to be able to write the Katakana characters directly in your program and have them come out correctly on the LCD display, the text editor you are using needs to be working in 8-bit character mode with a code page that exactly matches the 8-bit character set of the LCD. I haven't checked whether the character set of the LCD is a standard ISO 8-bit character set or Microsoft code page, so I don't know whether this is easy to do.

Ideally, the LiquidCrystal library would have a print function that takes UTF8 or UTF16 character strings and maps them to the correct characters in the LCD where possible.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Northern California (by San Francisco)
Offline Offline
Sr. Member
****
Karma: 3
Posts: 258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It looks like the LCD has its own unique character set. The basic Roman alphabet follows the ASCII (same as UTF-8) character set from hexadecimal 20 up until hexadecimal 7F. Then the Japanese katakana follow, with a few other Greek and other characters thrown in. The first 16 characters of the LCD character set you can define yourself.

I suspect the LiquidCrystal library focuses on the Roman alphabet characters, since they follow a standard. The Japanese katakana do not seem to follow any standard I can find. They are not Unicode, and seem to be ad hoc. I'm guessing they did it ad hoc to fit all the katakana in.

If I can figure it out, I'll try to create a map from Unicode to the LCD character set for the katakana. I'm sure someone in Japan has done it, but I can't find it anywhere. Not much demand for it on this forum, I'm sure.
Logged

Pages: [1]   Go Up
Jump to: