custom char____________________________________________________________________________________________________


In LCD, Custom character generation mean printing (displaying ) anything other than standard english character or symbol. In which you can program, any thing you want by doing each and every single pixel programming  including any laguage character and special character those not included in ASCII table also. Before going to discuss custom characters design on LCD, we will see how the standard characters (which are already stored in LCD memory during manufacture) are displayed on the 16×2 LCD.


Displaying standard characters on LCD

In 16×2 LCD controller HD44780, there are three memory are available to store characters, numbers and special symbols.

1. CGROM – character generating ROM which is responsible for stored standard character pattern.

2. CGRAM – character generating RAM which holds custom character pattern space ( total 8 in 2×16 module).

3. DDRAM – data display RAM which stores ASCII codes.

  • Steps to understand how character display:

1. Control unit of LCD receives signal(basically it is ASCII code) from user (usually microcontroller) and ask to DDRAM for its match.

2. If ASCII code match, control unit maps corresponding character pattern from CGROM.

3. According to that character pattern,  LCD screen energies and we can see character on it .


For example, in 16×2 LCD there are 16 segments available per single line. Each segment contains pixels in 5×8 or 5×10 matrix forms.



For example, a character in both uppercase ‘A’ and lowercase ‘a’ is designed by energizing corresponding pixels as shown below pic.

Untitled - Copy

                         In each row, the ON and OFF pixels of 5×8 matrix is represented by binary values 1 and 0 respectively, from these binary values the hexadecimal code is designed by gathering all 1’s and 0’s as shown in the figure . All these eight hexadecimal codes (referred as character pattern) of each character are stored in memory. LCD Manufacturers store these hexadecimal representation codes of all ASCII characters in character generator ROM (CGROM) area. We refer the hexadecimal codes in CGROM as standard or basic fonts of characters in LCD.

                         The Display Data RAM (DDRAM) stores the ASCII code of a character which is sent by the microcontroller.

                        Now the LCD controller (HD44780) maps the corresponding ASCII code in DDRAM with CGROM address to bring the hexadecimal codes (character pattern) of that particular character. By using those hexadecimal codes the 5×8 matrix segment will energize according to that character pattern to display corresponding character on it as shown in below pic.



Generating Custom Characters on LCD display

To create custom characters on LCD, the display controller (HD44780) make use of CGRAM area to store hexadecimal codes (character pattern) which are designed by user. In addition to CGRAM area, DDRAM area is also used to store the CGRAM address of a particular character which is sent by microcontroller in hexadecimal format.

                      Don’t confuse with the above section of this module “Displaying standard characters on LCD”, in which DDRAM and CGROM memory areas are used to generate regular standard characters. But here, to create and display custom characters on LCD, we use DDRAM and CGRAM (both are RAM’s). There are only 8 memory locations are available to store user defined characters in CGRAM with address 0x00 to 0x07 .


Steps to create and display custom character on 16×2 LCD

1. To create custom characters, first draw a table with 7 rows and 5 columns (5×8 matrix-left one raw for cursor) on a paper. Fill the corresponding squares with some color according to your style of custom character pattern and form the hexadecimal code for each row as shown in above pic of Uppercase ‘A’ & Lowercase ‘a’.

2. Initialize LCD with required commands.

3. Send the Initial address (0x40) of CGRAM as a command to LCD to store the custom character on that particular locations. The next address to store another custom character should be ‘0x48’. That means we should add eight bytes to the present address to get the next address of CGRAM.

4. Send the all hexadecimal bytes of custom character to CGRAM.

5. Force the LCD cursor to where you want to display your custom character. If it is beginning of 1st line, then send ‘0x80’ as command.

6. Send the position of your custom character in CGRAM to LCD.

1. circuit diagram of ARM7 ( LPC2148 ) with lcd in 4 bit mode to generate custom character 

ckt of generating custom charactor  using ARM7 ( LPC2148 )on lcd  IN 4 BIT MODE

1. Program of creating custom character on 4 bit lcd connected with ARM7 ( LPC2148 )





PROTEUS File for SIMULATION(Password Of RAR file is

download (1)

Content for the tab VIDEO