Page 30
Epson Research and Development
Vancouver Design Center
SED1352
Programming Notes and Examples
X16-BG-007-04
Issue Date: 98/10/08
5.2 Bitmaps and Text Displays
For the scope of this guide, a bitmap is a data structure which represents the image shown on the LCD. The bitmap includes
the dimensions of the image, and the gray shade palette used to program the look-up table. Text is shown by creating a font,
which in this example is a series of bitmaps, one bitmap per alphanumeric character.
Example 11: Display the word “TEXT” on a 16 gray shade 320x240 LCD panel; the Memory Interface is
16 bits.
1.
Define the font for the letters ‘T’, ‘E’, and ‘X’.
Each character is 8x8 pixels, with at least one horizontal and vertical side left blank for spacing.
Figure 9: Font for the Message “TEXT”
2.
Program the Look-up Table.
See Example 3, “Initialize the Look-Up Table,” on page 17.
3.
Calculate the display memory map.
See Figure 5, “Memory Map for 320 x 240 LCD Panel with 16 Gray Shades,” on page 25.
4.
Write font to display memory.
In a general purpose program the entire bitmapped font would be placed in an array. As characters are to be dis-
played, the program would choose the appropriate bitmap, select the proper position on the screen, and write to dis-
play memory. For this example assume that the program has already selected the proper bitmaps and the correct
positions in display memory (there is a detailed programming example later in this guide; see Section 6.3, “Advanced
Functions” on page 52).
Each highlighted pixel in the text bitmap will be shown at maximum intensity, which is pixel value 15. The text, for
simplicity, will be shown in the upper left corner of the screen. When the program has completed writing the pixels
for the word “TEXT,” the display memory will have the data shown in Figure 10. In this figure the bytes are grouped
within vertical lines.