Criação/exibição de caracteres urdu personalizados em LCD 16×2 usando microcontrolador 8051(89c51,89c52)

Creating/displaying custom Urdu characters on 16×2 LCD using 8051(89c51,89c52) microcontroller

This post is about displaying custom Urdu font characters on a 16×2 character LCD display with the help of 89c51 microcontroller. Earlier I discussed about 'How to display custom characters on 16×2 LCD screen with 8051 (89c51,89c52) microcontroller?'. This tutorial is done by following the same steps listed in the tutorial above. The only difference is that in this tutorial I have calculated the character data matrices for each character/alphabet of the Urdu language. The Urdu language is spoken in India, Pakistan, Bangladesh and Afghanistan. The national language of Pakistan is Urdu. Urdu alphabets are shown below.
Urdu alphabets OR characters

Urdu alphabets OR characters

LCD Custom Characters 16×2 Final Result

Urdu characters displayed on 16x2 LCD with 89c51 microcontroller

Urdu characters displayed on 16×2 LCD with 89c51 microcontroller
Urdu language alphabets on 16x2 LCD

Urdu Language Alphabets on LCD 16×2

CG-RAM (character generated ram) of HD44780 LCD controller

Creating and displaying custom Urdu characters on a 16×2 LCD display is not an easy task. If you are a newbie and have no experience with character LCDs. So first do the tutorial on How to create and display custom characters on 16×2 LCD? The tutorial will help you understand how the 16×2 lcd works, about its pinout and internal register structure, about the CG RAM memory? how to store data (characters) in RAM CG (generated character) memory? and finally, how to print the customized characters that are made in CG-ram on a 16×2 LCD screen?

Note: Each LCD character, regardless of its size (16×1, 16×2, 20×4, etc.), has an HD44780 LCD controller. Therefore, the custom character display technique is the same for each LCD display. Some larger size LCDs have two HD44780 controllers. Each controlling a single half of the LCD. For those LCD, the custom character display technique is still the same because of the same HD44780 controller behind the LCD.

CG-Ram can store up to 8 characters at a time. If you exceed this limit, the new characters will be replaced by the previous ones. For example, if in the first location we put '>' and the next 7 characters are placed in CG-RAM. Now the CG-RAM is fully occupied. Suddenly we send the ninth character '%' to the HD44780 controller to put it in CG-RAM. The HD44780 controller will accept the new character but place it in the first location. Where previously '>' was present. Now '>' is replaced by '%' .

Custom Language Alphabets Display on 16×2 LCD – Project Circuit Diagram

Connect the 16×2 LCD data pins to port 1 of the 89c51 microcontroller. The 16×2 lcd is interfaced with the 89c51 microcontroller in 8-bit mode (I don't understand, do the tutorial). Connect the rs (register select) pin of the LCD display to pin #3 of Port 3 and the en (enable) pin of the LCD to pin #6 of Port 3, ground the rw (read/write) pin of the LCD display. Grounding the rw pin tells the HD44780 controller that we only want to write to the LCD display. If you don't know how the 16x2 lcd works and how to connect it to the microcontroller here is a good tutorial 16X2 lcd working and pinout.
16x2 LCD Custom Character Display with 89c51 Microcontroller - Circuit Diagram

Custom character display on 16×2 LCD with 89c51 microcontroller – Circuit diagram
In the above code, I first created and placed the initial eight alphabets of Urdu language in CG-RAM and then displayed them on the LCD screen. After a few seconds of delay, I made the eight characters again and placed them in the CG-RAM of the 16×2 LCD display. The new eight alphabets replace the previous ones and so I called them to be displayed on 16×2 LCD. This process repeats unless all alphabets are displayed on the LCD. The entire code is placed in while(1) loop so that the code is executed repeatedly with the same logic.

Some more tutorials on how to display custom characters on a 16×2 LCD screen. Each project is made with a different microcontroller. All projects are open source, you can modify the circuit and code according to your needs.

Displaying custom characters on LCD using Arduino uno

Displaying custom Urdu alphabets on 16×2 LCD screen with arduino uno

pic

Displaying Custom Urdu Characters on LCD with Microcontroller pic

Download the project code files. The code is written in Keil Uvision IDE. The code is open source. Don't forget to provide us with your comments about the project.
Urdu Custom Character Code/Files
Back to the blog

Leave a comment

Comments need to be approved before publication.