Using RTS/CTS and automatic handshaking
Handshaking is a method used by RS-232 to ensure communications equipment is free to receive or transmit data. This interface is often called RTS/CTS (hardware handshaking) or DTR/DTE.
Automatic handshaking for the SDM‑SIO2R is activated through use of the BaudRate
parameter of the SerialOpen()
instruction. When the BaudRate
value is set to a negative number, the SDM‑SIO2R will enable automatic handshaking. It is worth noting that normally setting the BaudRate
to a negative number will enable automatic baud rate detection; this is not the case for the SDM‑SIO2R.
When enabled, the two I/O ports will operate as RTS and CTS lines. It is important that the remote equipment supports handshaking, as no data will be sent if handshaking is enabled but is not supported by the equipment the SDM‑SIO2R is connected to.
Once handshaking is enabled,
Enabling handshaking will increase active current consumption due to the extra RS-232 load. It will not affect sleep current, however, as the RS-232 chip is disabled (sleep is set by calling the SerialClose()
function).
For connection diagrams and further information on using handshaking, consult Wiring examples for connecting the SDM‑SIO2R.
-
Auto flow control should only be selected in RS-232 mode.
-
When Auto flow control is enabled, the user cannot set or clear the spare I/O ports.