Go Down

Topic: How do I drive a JHD 162A LCD display? (Read 4092 times) previous topic - next topic

Daanii

Sep 04, 2011, 02:33 am Last Edit: Sep 04, 2011, 03:18 am by Daanii Reason: 1
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.

floresta

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

Daanii

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

Daanii

#3
Sep 04, 2011, 06:09 am Last Edit: Sep 04, 2011, 06:38 am by Daanii Reason: 1
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.

floresta

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

dc42


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.
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.

Daanii

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.

Go Up