Owner manual

GLK24064-25 rev. 06
25
* If the module detects that the file will not fit in the available memory when the file size has been
transmitted, it will send 0x08 instead of 0x01. In this case, the host should cease transmission. The
module will return to a ready state.
From this point, the module treats all data as raw and just stores it away. The module will store the data,
then read it back from memory and send the read value back to the host. If the host system receives an
incorrect echo, it should send status as 0x08 instead of 0x01. This will terminate the transfer. Upon
termination, the module will delete the partially completed file and return to a ready state.
6.4.3 A Sample Font File
Let's look at a short sample font file containing only the letters "h", "i" and "j". First we need to define the
font size. For this example we'll use a 5 x 7 pixel font. Next, we have to draw the bitmaps for each of the
characters. We'll use the examples shown in Figure 6-1.
Figure 6-1 Bitmaps for h, i and j
Now the bitmaps have to be converted to bytes. If the font is 8 bits high, this is a pretty simple job because
each vertical column is simply one byte (lsb at the top). In this case, however, the font is only 7 bits high so
the bytes "wrap around" as shown in Figure 6-2.
1
2
4
8
1
2
4
8
lsb
byte 1
byte 2
byte 3
byte 4
byte 5
byte 5 overflow (ignored)
7F
04
81
80
07
Bytes "straightened out"
Figure 6-2 Bytes for a 7 bit high font
We've marked in the bits that are set for the letter "h". Remember that the bytes are "inverted", i.e. the LSB
is at the top. Each byte is shown in a different colour in the diagram. When the bytes are straightened out,
it's simple enough to find their hex values, which are shown in the diagram above each byte. Trailing zero
bytes at the end of narrow characters are not included in the file.
Now let's look at the file itself.
Example Font File (27 bytes)
0xFF 0xFF 0x05 0x07 0x68 0x70 0x00 0x0F
0x05 0x00 0x14 0x03 0x00 0x17 0x04 0x7F
0x04 0x81 0x80 0x07 0xC4 0x3E 0x10 0x02
0x20 0xB1 0x07
The colours refer to: Font information header, character 'h', character 'i', character 'j'.