Configuring a serial port, Warning – Wavetronix Click 500 (programmable controller) (CLK-500) - Developer Guide User Manual
Page 72
CHAPTER 7 • SERIAL PORTS 71
Warning
On the receive side, if data is simultaneously received on different physical ports
connected to the same virtual port, then this will cause a data collision. A request-
response protocol, back-off routine or some other mechanism is needed to arbitrate
the shared bus to prevent or overcome this type of data contention.
Configuring a Serial Port
Serial ports can be configured by either specifying a physical or virtual serial port. If a vir-
tual serial port is chosen, then all physical serial ports that are connected to that virtual port
are configured. When configuring a port, the following settings can be changed:
˽
Baud rate
˽
Number of data bits
˽
Parity bit
The valid options for these three settings are shown in Table 7.1 below.
Baud Rate
Data Bits
Parity Bit
1200
DATABIT_7
PARITY_0 (odd)
2400
DATABIT_8
PARITY_E (even)
4800
PARITY_N (none)
9600
18200
38400
57600
115200
Table 7.1 – Port Settings
An example of configuring physical and virtual serial ports is shown below.