dbrgn / RPLCD

A Raspberry Pi LCD library for the widely used Hitachi HD44780 controller, written in Python. GPIO (parallel) and I²C modes supported.
https://rplcd.readthedocs.io/en/latest/
MIT License
261 stars 72 forks source link

Character map does not seem to match A02 tables #117

Closed etokheim closed 3 years ago

etokheim commented 4 years ago

Please tell me if I've misunderstood, but I think there is a miss-match between the A02 tables and which characters are shown on the display.

When I try to write the Danish/Norwegian letters: æ/ø/å, the screen displays different characters. Check out the attached image, where line one corresponds to the characters on line two. (ae = æ, oe = ø and aa = å).

20200719_203056

I wrote to the display using this command: lcd.write_string("ae, oe, aa\n\ræ ø å")

I used this pdf, page 18, to reference which characters the A02 table contains.

janis-ax commented 3 years ago

@etokheim have you fixed it? Look's like I have the same issue

janis-ax commented 3 years ago

So for me it solved using charmap 'A00' to print the German "ö", "ä", and "ü"

dbrgn commented 3 years ago

Sorry for the late response. It's possible that your display does not match the A00 or A02 tables, but contains a custom mapping.

As described here https://rplcd.readthedocs.io/en/stable/usage.html#character-maps you can use the show_charmap target of the rplcd-tests script to write all characters sequentially to the display. Then you can compare with the character maps in the PDF.

If there's a mismatch, you probably need to create your own character map, or alternatively use custom characters or raw character references.

Does that help, @janis-ax @etokheim?

janis-ax commented 3 years ago

Yep, so my LCD supports only A00 and not A02, but it's okay.

etokheim commented 3 years ago

Hey, @dbrgn. Thanks for the reply!

I haven't worked on this project since January, but I will definitely try your suggestions when I resume development. I guess it's likely that my display has some sort of custom mapping...

I can, and have created some custom characters as a temporary fix, but as far as I know you can only create up to 8 custom characters. That's unfortunately not enough, though I've fixed the most common letters.

dbrgn commented 3 years ago

@etokheim @janis-ax alright, I'll close this issue for now! You can still leave comments though.

astroganga commented 1 year ago

Hi, I have the same issue on a 20x04 i2c display. Only the A00 table match with documentation. A02 does not match. Sadly I cannot use latin letters of my language.

Also, the show_charmap function of the rplcd-tests script does not select tables other than A00. It seems that the write function always prints characters from A00.

dbrgn commented 1 year ago

Hi @astroganga, this reply is still valid.

Note that you can also create up to 8 custom characters if you're missing some character.