beautypg.com

Matrix Orbital GLK12232-25-SM Legacy User Manual

Page 28

background image

Table 4: Uploading the file to the Module

Host sends

Module sends

0xfe

’$’ (command))

’2’ (reference

0x01 (host confirms echo)

0x5e (low size)

0x5e (echo)

0x01 (host confirms echo)

0x00 (high size)

0x00 (echo)

0x01 (file fits)*

0xFF (first byte of data)

0xFF (echo)

0x01 (host confirms echo)

0xFF (second byte of data)

0xFF (echo)

0x01 (host confirms echo)

0x20 (third byte of data)

0x20 (echo)

0x01 (host confirms echo)

etc

NOTE 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.

7.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 5x7 pixel font. Next, we have to draw the bitmaps for each of the

characters.

Matrix Orbital

GLK12232-25-SM

24