3 flow control – Matrix Orbital GLK12232-25-SM Legacy User Manual
Page 17

17
The bar graphs may be located anywhere on the display, but if they overlap, they will not display properly.
Note: it is important that [x
1
] is less than [x
2
], and [y
1
] is less than [y
2
].
This command doesn't actually draw the graph, it must be "filled in" using the Write to bar graph command,
described below. The unit saves time by only drawing that part of the bar graph which has changed from the
last write, so the representation on the screen may not survive a screen clear or other corrupting action. A
write of value zero, followed by new values will restore the proper look of the bar graph.
4.2.8 Write to bar graph (254 105 [reference number][value])
Once the bar graph has been initialized it can be "filled in" using this command. This command sets the bar
graph [reference number] to value [value]. [value] is given in pixels and should not exceed the available
height/width of the graph. (If it does, the graph will simply be written to its maximum size.)
4.2.9 Display saved bitmap (254 98 [reference number][x][y])
This command causes a previously stored bitmap referenced by [reference number] to be displayed to the
screen at pixel location (x, y) where this location defines the top left corner of the bitmap. Note: The
reference number is established when the bitmap is saved, normally using mogd.exe. Bitmaps and fonts
may use the same reference numbers, i.e. you can have both a bitmap 1 and a font 1.
4.3 Flow Control
The GLK12232-25-SM has built-in flow control which is very useful during multiple pixel placement. Flow
control is enabled or disabled by two commands (see Table 8-5 and the next two sections). If flow control is
enabled, the GLK12232-25-SM will return an "almost full" message (0xFE) to the controller when its
internal buffer fills to a defined level, and an "almost empty" message (0xFF) when the buffer contents drop
to a defined level.
4.3.1 Enter Flow Control Mode (254 58 [full][empty])
Note: Flow control applies only to the RS-232 interface. It is not available for I
2
C.
This command enables flow control. When the buffer fills so that only [full] bytes are available the
GLK12232-25-SM will return an "almost full" message (0xFE) to the controller. When the buffer empties
so that only [empty] bytes remain the GLK12232-25-SM will return an "almost empty" message (0xFF) to
the controller.
The GLK12232-25-SM will return the "almost full" message for every byte sent to the GLK12232-25-SM
until the used buffer space once more drops below the [full] level.
Whether the user is in ‘Flow Control Mode’ or not, the module will ignore display or command bytes which
would overrun the buffer. While in ‘Flow Control Mode’ the unit will return 0xFE when buffer is almost
full even though it may have already thrown rejected data away. The buffer size for the GLK12232-25-SM
is 96 bytes.
When using this command in an application, selection of the value for the buffer almost full should be
considered very carefully. This is a critical aspect of using this command to it’s full potential. When using a
host system or PC which contains a FIFO, the user should set the value of equal to or greater than the size
of the FIFO. The reason for this is that the FIFO may be full when the host system receives 0xFE. In the
case of 16550 UART the size at its maximum is 16, therefore the value of should be set to 16 or greater.
This mode must not be used during loading of fonts and bitmaps. It is highly recommended for use
with direct screen write and multiple pixel placements.