beautypg.com

2 uploading the file to the module – Matrix Orbital GLK12232-25-SM Legacy User Manual

Page 25

background image

25

O-Low Width O-High O-Low Width O-High O-Low Width

O-High

O-Low

Width

Data Data Data Data Data

Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data
Data Data Data Data Data

6.4.2 Uploading the File to the Module

The Upload Font command is used to actually upload the font file. Recall that the syntax for this command
is:

0xFE 0x24 [ref] [file size] [file data]

In this example the file size is 94 bytes (0x5E) and the reference number is 2. The communications
exchange between the host and the module looks like this:

Host sends

Module sends

0xfe
'$' (command)

'2' (reference)

'2'

(echo

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

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