Go Down

Topic: Need Help>> How to display Arabic Character on LCD with Arduino>> (Read 2917 times) previous topic - next topic

KAIL

The question is clear from the subject title , i have project to display Arabic character on LCD , can someone help how to use Arduino for this project . or how to include the ASCII Arabic code ???


Tired Of Trying

AWOL

Quote
or how to include the ASCII Arabic code

ASCII is a seven bit code, and doesn't include any Arabic characters, other than the decimal digits.
You may find variants of the common Hitachi-compatible LCDs that have Arabic characters in their ROMs.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

guix

Hello and welcome :)

Which LCD model are you using? Because there are many, some of them can display custom fonts or images, most others can't...

dc42

It may be easier to use a graphic LCD, then you have complete control over the font. This http://www.avrfreaks.net/modules/FreaksFiles/files/3820/ArEnGLCDLib.pdf may be helpful.
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.

NickPyner


or how to include the ASCII Arabic code ???


Well, you're the arab and should know, but I don't think such a thing exists. This doesn't leave you out in the cold, I have an arabic phone. If you can't get better information from closer to home, you might try using a cheapo graphic LCD rather than an ASCII display.  I use the Nokia 5110 48x84. I haven't seen an arabic character set for it, but I bet there is one.  There is an on-line glyph editor for it and I'm sure you could make your own with that, though I suspect you might need to have some artistic sense!

realtime

Hi there!
I got the same problem and analysed the issue a bit. I want to be able to type arabic signs onto the S65 display from watterott using a standard 3x4 mobile phone like keypad matrix.

The problem splits in 2. Displaying and concatenating the letters while typing. The 2nd is the more difficult one since I can not speak arabic, but I assume there must be some examples that implement the rules how arabic letters are put together.
As far as I've read:
1) There are are tree types of letters depending on their position initial (front), medial (middle) and final (back).
2) There are ligatures.
3) Arabis people have issues of reading the words if you only use the letters printed on old mobile phone's keys. That means one has to implement the logic.
4) I found a font set from Osama that might be usable for the task: https://sites.google.com/site/osamaslab/Home/projects-list/arabic---english-glcd-library
Unfortunately the font is quite small (8x8) would be good if someone would point me to a bigger font.
5) I am stuck on how to put letters together....


... so far.

floresta


The question is clear from the subject title , i have project to display Arabic character on LCD , can someone help how to use Arduino for this project . or how to include the ASCII Arabic code ???

The question indeed was clear from the subject title but the inclusion of the term ASCII in your actual post is the part that confuses things.

The 'A' in ASCII stands for 'American' since the code was initially designed to display the American version of the English language.  The commonly used character mode LCDs are based on a Hitachi controller chip and there are ROM versions available with Japanese characters but I don't know about Arabic.

I think the recommendation to use a graphical LCD (GLCD) is your best choice.  In any case, as you continue your search for information you may have more luck using the terms 'Unicode' or 'UTF-8'.

Here are a few links to explore:
http://arduino.cc/forum/index.php/topic,37750.0.html
http://www.orientdisplay.com/lcd-character-fonts.html
http://www.electro-tech-online.com/general-electronics-chat/110833-lcd-arabic-letter.html


Don

olikraus

Unicode has defined chars from 0x0600 to 0x06ff as arabic chars: http://www.unicode.org/charts/PDF/U0600.pdf.
Assuming that this is almost complete, then the range from  0x0600 to 0x06ff can be mapped to 0 to 255 (well from 1 to 255, because in C the 0 usually terminates a string).

Unifont claims that the arabic glyphs from 0x0600 to 0x06ff are included: http://unifoundry.com/unifont.html.

So, the following steps will provide arabic chars with u8glib

1. Download unifont BDF
2. Download bdf2u8g font converter from here: http://code.google.com/p/u8glib/downloads/list
3. Create a u8g font with arabic glyphs: bdf2u8g -l 12 -u 13 -b 0 -e 255 <bdf-file> <u8g_font_arabic> <u8g_font_filename>
4. Use the new font in your project

Oliver

realtime



5) I am stuck on how to put letters together....



Any suggestions for this one? I am still stuck here. It would be good to have some sample app to understand the change of the letters.

RT

olikraus

#9
Feb 02, 2013, 03:38 pm Last Edit: Feb 02, 2013, 05:14 pm by olikraus Reason: 1
I spend some time on arabic characters. I do not know much about this language, but differences are (A) different writing direction and (B) different chars are used when characters are connected.
I tried to output "Hello"
Which should be: مرحبا
However individual glyphs are: م ر ح ب ا

At the moment u8glib can generate the second string only:
Code: [Select]

void draw(void) {
  u8g.setFont(u8g_font_unifont);
  u8g.drawStr( 0, 12, "U8glib");
  u8g.setFont(u8g_font_unifont_12_13);
  // http://rishida.net/tools/conversion/
  // u8g.drawStr( 0, 12, "\x45\x31\x2d\x28\x27"); 
  // letters are written from right to left
  u8g.drawStr( 0, 26, "\x27\x28\x2d\x31\x45");
}

Code page 0x0600 (u8g_font_unifont_12_13) will be available in the next u8glib release v1.10.



For sure not a perfect solution with u8glib, but this is at least the current state.

Oliver

Edit: U8glib v1.10 is now available for download: http://code.google.com/p/u8glib/downloads/list

Go Up