beautypg.com

File upload protocol, File upload protocol o – Matrix Orbital GLK24064-16-1U User Manual

Page 36

background image

31

File Upload Protocol

Once a bitmap or font file has been created and paired to its command it must be sent using a file
protocol developed specifically for Matrix Orbital displays. Once a file upload command has been sent
requesting a unique reference number and specifying the file size required, the display will respond
indicating whether it has enough room to save the file or not. As is the case throughout the upload
protocol, a response of 1 will indicate confirmation while an 8 corresponds to rejection and will
terminate the session.

Table 29: Upload Protocol Responses

Value Action

Description

1

Confirm Transfer successful, upload continues

8

Decline

Transfer failed, abort upload


Once a file is confirmed to fit within the display, the upload will begin. A protocol is used here to ensure
each byte is uploaded successfully. After each byte is sent, the module will echo it back to the host. It
should then be checked against the value originally sent before a confirmation byte of 1 is returned. If
the transmitted and echoed values do not match the upload should be aborted by sending a value of 8
instead. The upload will continue in this manner as indicated by the examples below which utilize
familiar font and bitmap files.


Table 30: Font Upload Protocol

Host Display

Comments

254

Command Prefix

36

Upload Font File Command

1

Reference ID

31

Font File LSB

0

Font File MSB

1

Size Confirmation

5

First Font Data Byte

5

Echo Data Byte

1

Confirm Data Byte

...

...

...

96

Last Font Data Byte

96

Echo Data Byte

1

Confirm Data Byte

Table 31: Bitmap Upload Protocol

Host Display

Comments

254

Command Prefix

94

Upload Bitmap File Command

1

Reference ID

5

Bitmap File LSB

0

Bitmap File MSB

1

Size Confirmation

5

First Bitmap Data Byte

5

Echo Data Byte

1

Confirm Data Byte

...

...

...

224

Last Bitmap Data Byte

224

Echo Data Byte

1

Confirm Data Byte


It should be noted that the display has a timeout setting of 2.1 seconds before it resets to prevent it
from hanging during the upload process. Upon reset, the values 254 and 212 will be returned to
indicate an error or lengthy delay has occurred in the upload process. If everything goes smoothly, the
protocol will end with the host transmitting a final confirmation byte and the font will be stored in the
display ready for any application.