
www.4dsystems.com.au
µ
V
G
A
-PICASO-
MD1
10
6
Graphics Command Set (Serial)
The heart of the
µ
V
G
A
-PICASO-
MD1
module is its rich graphics oriented command set.
This comprises of powerful instructions that can draw lines, circles, rectangles, text, images,
etc. to provide a full graphical user interface. The commands can be either sent via the
serial link or called as functions from the built-in library if the platform is running a higher
level language such as 4DGL. The command set is divided into 2 groups:
•
General Command Set
o
These commands are generic and are standard commands that apply across
all applications.
•
Extended Command Set
o
The
µ
V
G
A
-PICASO-
MD1
module supports an external micro-SD (
µSD
)
memory card. This feature is not implemented yet, but when it becomes
available the revised firmware will be available for download to re-program
the module via PmmC operation. This Extended Command set will be
documented fully when it is implemented. Check the 4D website for details.
The General Command set is described in detail in the following section with its syntax.
Please note that all command examples listed below are in hex (
00
hex). Due to the high
resolution nature of the
µ
V
G
A
-PICASO-
MD1
, a pixel horizontal and vertical address
coordinates (x, y) will not fit into a single byte, which can only hold a maximum value of
255. Therefore each of the
x
and
y
pixel address data are represented as a 2 byte value,
x
(msb:lsb) and
y
(msb:lsb). The most significant byte (msb) is transmitted first followed by
the least significant byte (lsb). This format is called the big endian. So for a 2 byte
coordinate value of
013F
hex the byte order can be shown as (
01
hex),(
3F
hex).
NOTE:
When transmitting the command and data bytes to the
µ
V
G
A,
do not include any
separators such as commas ‘,’ or spaces ‘ ‘ or brackets ‘(‘ ‘)’ between the bytes. The
examples show these separators purely for legibility; these must not be included when
transmitting data to the
µ
V
G
A.
When a command is sent, the
µ
V
G
A
will reply back with a single acknowledge byte called
the
ACK
(06hex). This tells the host that the command was understood and the operation is
completed. It will take the
µ
V
G
A
anywhere between 1 to several milliseconds to reply back
with an
ACK
, depending on the command and the operation the
µ
V
G
A
has to perform. If the
µ
V
G
A
receives a command that it does not understand it will reply back with a negative
acknowledge called the
NAK
(15hex).
If a command that has 5 bytes but only 4 bytes are sent, the command will not be executed
and the
µ
V
G
A
will wait until another byte is sent before trying to execute the command.
There is no timeout on the
µ
V
G
A
when incomplete commands are sent. The
µ
V
G
A
will reply
back with a
NAK
for each invalid command it receives. For correct operation make sure the
command bytes are sent in the correct sequence.