Appendix A. Using the
handshaking lines for general
input/output
This appendix describes how to use the CTS and RTS lines for input and output ports.
The I/O pins (CTS/pin 11 and RTS/pin 8) can be read or set by the user as required, allowing
unique protocols to be created, or they can simply be used as flags or enable lines.
If the user enables automatic handshaking as discussed in
(p. 24), pins 8 and 11 cannot be accessed.
A.1 The input pin (CTS/pin 11)
The state of the input line (pin 11) can be read by using the special
SDMGeneric()
instruction in
CRBasic.
Bit 16 of a value returned to the data logger using the
SDMGeneric()
instruction reports
whether the input is logic high or low. The following example shows how to call the instruction
with the required parameters.
SDM-SIO1A and SDM-SIO4A Serial Input/Output Modules
32