User`s manual
8 Serial Port I/O
8-30
access to the command line, and you can issue additional commands while the
read or write function executes in the background.
The terms “synchronous” and “asynchronous” are often used to describe how
the serial port operates at the hardware level. The RS-232 standard supports
an asynchronous communication protocol. Using this protocol, each device uses
its own internal clock. The data transmission is synchronized using the start
bit of the bytes, while one or more stop bits indicate the end of the byte. Refer
to “Serial Data Format” on page 8-11 for more information on start bits and
stop bits. The RS-232 standard also supports a synchronous mode where all
transmitted bits are synchronized to a common clock signal.
At the hardware level, most serial ports operate asynchronously. However,
using the default behavior for many of the read and write functions, you can
mimic the operation of a synchronous serial port.
Note When used in this guide, the terms “synchronous” and “asynchronous”
refer to whether read or write operations block access to the MATLAB
command line. In other words, these terms describe how the software behaves,
and not how the hardware behaves.
The two main advantages of writing or reading data asynchronously are:
•You can issue another command while the write or read function is
executing.
•You can use all supported callback properties (see “Events and Callbacks” on
page 8-48).