displayDefineChar (Function) |
Top Previous Next |
This function is used to define a character in the display.
The display uses characters 8 pixels wide by 16 pixels high. To help visualise and calculate the character map, use a table with 8 * 16 cells, where each cell represents a pixel.
(Figure 1. Empty character pixel map)
The last 4 rows (with green background in Figure 1) are below the writing line and should only be used if a character similar to "p", "g" or "q" is defined.
Draw the character in the table by using 1's (1's show a pixel) and 0's (0's hide a pixel) as shown in Figure 2.
(Figure 2. Sample character: Smile)
Once the table has been filled, calculate the 2 Hex digits for each line. The map string in the function contains the Hex digits from the top left and down. For the sample character in Figure 2., the map string would look like this: "0000180C6666060666660C1800000000"
Note: only upper case characters can be used and no spacing characters can be included.
Input: index : INT (0..31) The index of the character to define.
map : STRING The calculated map of the character.
Returns: INT
Declaration: FUNCTION displayDefineChar : INT;
Example: INCLUDE rtcu.inc |