HDTV Antenna
& Tuner Box
GPS, Receivers
RF Modules
Voice Modules

Credit Card Payment

Follow us on Twitter Facebook

Custom Characters for LCD module

This tutorial shows you how to make custom characters on both LCD modules. Custom characters can be handy when you can want to display something unique or characters not defined in ASCII codes.

Each character on the LCD panel is composed of 5x8=40 pixels. Different characters are formed by turning on the pixel at different positions at the same time.

Designing the character

Let's make a happy face character to illustrate how it looks like in a grid. Since the grid is narrow, we will make a simple happy face and keep it in the center as shown in the grid below. Note it is always a good idea to draw your character on the paper first, so you can see the end result and rearrange the pixel positions if needed.

Once the character looks ok, we can change the grid into binary format by giving 1 to each black pixel and 0 to each white pixel. By converting each row into the binary format, it will be easy for the module to use it to turn on (1=high) or turn off (0=low) each pixel.
CustomChar command

Once we have designed the character, we are ready to use the LCD module. Both LCD2x16 and LCD4x20 modules have the CustChar() command which you can use to define your character like the happy face above. The syntax of the CustChar() is:

myLCD.CustomChar(Index, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8)

where Index refers to the index of the characters. You can define up to eight custom characters,
Arg1....Arg8 refers to the decimal format of the binary number of each row as shown in the table above.

To define our happy face, we will call the command like this:

myLCD.CustomChar(0, 0, 10, 10, 0, 4, 17, 14, 0)

Displaying the character

Once it is defined, you can call it using the DisplayChar() command as follow:


The argument in DisplayChar() command can be the index of the user defined character 0-7, or any character in ASCII format.

'display the happy face char with space (32 in ASCII code) in between myLCD.DisplayChar(0, 32, 0, 32, 0)
myLCD.DisplayChar(0,0,0,0) 'display 4 happy face continously

Download: led_custchar.inb

For other commands, see the LCD Manual.

  • Robot Kits
  • Commander Module
  • Commander Boards
  • Development Boards
  • Smart Modules
  • General Modules
  • Accessories
  • InnoBasic
  • catalogue

  • DIY Projects
  • ID MAP
  • Identifier List
  • InnoBasic Workshop

  • FAQ | Terms & Conditions | Contact Us

    Copyright © 2018 Kowatec Corporation. All rights reserved.