www.4dsystems.com.au
µ
V
G
A
-PICASO-
MD1
39
7
Serial Interface (TTL Level)
The
µ
V
G
A
-PICASO-
MD1
module communicates with the outside world via its serial link.
The serial link is always used as a means to upload a
PmmC
file for a new platform change
or to update the module with enhancements. If the module is running the “
Serial
Command
” platform, it can be used by a host processor to send serial commands to the
module so that characters and graphics can be displayed on the screen. If the module is
running the “
4DGL High Level Language
” platform then user application code is
downloaded into the
PICASO
processor via the same serial link.
Note
:
The serial connection (RX/TX) is at TTL levels (0 – 3.3V) and the logic levels are
“high” = 1 = 3.3V, “low” = 0 = 0V. If interfacing to a host system running at voltage levels
greater than 3.6V, then a 1K series resistor must be inserted between the Host TX and the
µ
V
G
A
-PICASO RX signal.
Auto Baud Detect:
The
µ
V
G
A
-PICASO-
MD1
has an auto-baud detect function which can operate from
2400
baud to 1M baud
. Prior to any graphical formatting and commands being sent, it must
first be initialized by sending the ASCII character
‘U’ (55h)
after power-up. This will allow
the module to determine and lock on to the baud rate of the host automatically without
needing any further setup. This must be done every time the module is powered up or
reset.
If the module needs its baud rate changed, then it must be powered down and powered
back up again or go through a reset. The “U” command cannot be used to change the baud
rate during the middle of normal usage.
Serial Command Timing:
Each serial command is made up of a sequence of data bytes. Some commands are a single
byte and others are multiple bytes. When a command is sent to the module and the
operation is completed, it will reply back with a single acknowledge byte called the
ACK
(06h). This tells the host that the command was understood and the operation is completed.
It will take anywhere between 1 to several milliseconds to reply back with an
ACK
,
depending on the command and the operation the
µ
V
G
A
-PICASO-
MD1
has to perform. If
it receives a command that it does not understand it will reply back with a negative
acknowledge called the
NAK
(15h).
For example, if a command has 5 bytes but only 4 bytes are sent, the command will
not be executed and when the next following command bytes are sent the module
will reply back with a
NAK
for each and every byte it receives. For correct operation
make sure the command bytes are sent in the correct sequence.
Note
:
No termination character is to be sent at the end of the command sequence.
i.e. don’t send any CR, or Null, or any other end of command bytes.