Graphic displays are great for projects that require both text and pictures to be displayed, but the text can be difficult to read on displays that have a small pixel size. An easy solution is to utilize the custom character generator that is built into the Toshiba tc6963 controller to generate a font that is bolder than the characters generated by the internal CGROM.
The software example was created using the Bascom-Avr compiler. Bascom-Avr has a set of built-in graphic LCD tools that make interfacing painless. The two commands: locate(x,y), and LCD are used to display text that is generated by the internal CGROM. The fist step in using custom characters is to create them. Each eight-byte line in the FONTC data table represents one custom character. Each character's data file is created using the following format:
It is easy to understand how the characters are created and stored by looking at the above figure and comparing it with the FONTC table. After the data table is built, it must be stored in the LCD ram memory. The three steps needed to store the characters are: set- offset, set address pointer, and store characters. These routines access the library functions for the LCD that were included when the CONFIG GRAPHLCD command was invoked. Assembly language is used to interface with the library functions that are also written in assembly. The complier recognizes assembly lingo which makes it easy to include.
SET OFFSET - This step is need to set the address location where the characters are stored. The command is &H22 and the data is &H0003. This will set beginning of the custom character storage at memory location &H1C00.
SET ADDRESS POINTER - This step sets the pointer to &H1C00. This is where the FONTC table will be stored.
STORE CHARACTERS - This step is responsible for reading the FONTC table and writing it to the LCD ram starting at the location of the address pointer.
To print the custom characters to the LCD, you first set the cursor position with the locate(x,y). The text to be displayed is stored in the variable Btxt. After setting the cursor and storing the text in Btxt, call the sub routine TEXT with Btxt as the argument. The text to be displayed must be in CAPS. In this example letters A-Z and numbers 1-9 get the bold treatment.
This application adds some additional functionally for text display that is easy to implement. The large font is easy to read and is invoked by a simple sub-call. The ability to print both regular and bold text will allow for a more creative interface.