Step 9: Big Number Clock on LCD
We will use custom characters to create big number fonts on the LCD, making it look much better.
The LCD datasheet talks about two RAM sections, DDRAM which is for "display data", meaning the text on display, and CGRAM, which is the "character generator" data, containing the custom font.
So during initialization of the LCD, we load up the CGRAM with some custom characters. The commands we need are the ones needed to set the CGRAM address, and then write to the CGRAM.
So what I've done is create several "block-like" characters, which can be arranged into numbers that are two lines high.
Please see the attached demonstration, it should cycle through the possible numbers for you.
The idea is from http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1213319639
Remove these ads by
Signing Up























































Visit Our Store »
Go Pro Today »




By now you know how to write data to the LCD and what to write into it. The example source code in step 9 shows you my technique for storing the bitmap into your microcontroller's memory as arrays of bytes, and then sending them over during initialization of the LCD. Each custom block character is 8x5 pixels and is stored as an array of 8 bytes, and are sent into the CGRAM of the LCD during initialization.