3 commands 6.4 working with font files, 3 commands, 4 working with font files – Matrix Orbital GLK24064-25 Legacy User Manual
Page 23
GLK24064-25 rev. 06
23
6.3 Commands
In addition to the commands listed below, you may use the mogd.exe program to save fonts and bitmaps to
the GLK24064-25's flash memory. Before issuing commands to the GLK24064-25 please read sections
8.2 and 8.3.
6.3.1 Erase file (254 173 [type] [ref])
This command erases a file within the GLK24064-25 memory. This command erases a single file at a time.
This command needs to be given two parameters: [type] and [ref]. The file type and reference number are
defined when the file is saved to the GLK24064-25 using mogd.exe. Since there is no command to list files
in memory, the user must keep track of the memory contents.
[type] = 0x01 is a font file
[type] = 0x05 is a bitmap
Once this command is completed all files “move up” and recover the empty space for efficient memory
management.
6.3.2 Purge memory (254 33 89 33)
This command completely erases the GLK24064-25's non-volatile memory. This removes all fonts, font
metrics, bitmaps, and settings (current font, cursor position, communication speed, etc.). It is an "odd"
command in that it is three bytes in length. This is to prevent accidental execution.
6.3.3 Upload Font (254 36 [ref] [file size] [file data])
This command begins a font upload to the GLK24064-25's non-volatile memory. [ref] is the reference
number to be used for this font. File size is a 2 byte value that must be calculated by the host before the
transfer takes place. See section 6.4 for details.
6.3.4 Upload Bitmap (254 110 [ref] [file size] [file data])
This command begins a bitmap upload to the GLK24064-25's non-volatile memory. [ref] is the reference
number to be used for this bitmap. File size is a 2 byte value that must be calculated by the host before the
transfer takes place. See section 6.5 for details.
6.4 Working with Font Files
A font file consists of a header, a character list, and character bitmaps.
The header consists of:
! Placeholder for actual EOF (2 bytes, use 0xFF 0xFF – these bytes will be set to their final value by the
module)
! Nominal character width (1 byte)
! Absolute font height (1 byte)
! ASCII value of first character defined in this file (1 byte)
! ASCII value of last character defined in this file (1 byte)
The character list consists of groups of 3 bytes per character:
! Offset to character bitmap (2 bytes)
! Actual width of this character in pixels (1 byte)