Data Sheet
Ether I/O 24R Users Manual V1.1
Elexol Pty Ltd Version 1.1 Page 20 http://www.elexol.com
ELEXOL
ELECTRONIC SOL UT IONS
Command Set
Write Port A
ASCII Code Bytes Data Function
A 2 Port-Value Writes data to ports output lines. A bit value of 1 sets the
corresponding line high and a 0 sets it low
The power up default value for this port is 0
Operation: This command affects any of the eight lines of port A that are set as outputs. The port
value is written to the entire port with each of the values bits affecting the corresponding
I/O line. To change a single I/O line without affecting the others it is required to store the
old value of the port or read its current value before writing a new value with only the
corresponding bits changed. This command does not affect any I/O lines that are set as
Inputs.
Example:
Winsock1.SendData “A” + Chr$(Value)
Write Port B
ASCII Code Bytes Data Function
B 2 Port-Value Writes data to ports output lines. A bit value of 1 sets the
corresponding line high and a 0 sets it low
The power up default value for this port is 0
Operation: Same as Write Port A
Example:
Winsock1.SendData “B” + Chr$(Value)
Write Port C
ASCII Code Bytes Data Function
C 2 Port-Value Writes data to ports output lines. A bit value of 1 sets the
corresponding line high and a 0 sets it low
The power up default value for this port is 0
Operation: Same as Write Port A
Example:
Winsock1.SendData “C” + Chr$(Value)
Write Port A Direction Register
ASCII Code Bytes Data Function
!A 3 Direction Writes data to port’s direction register. Lines with a
corresponding bit value of 0 are set as outputs, lines with a bit
value of 1 are set as inputs
The power up default for Direction is 255 setting all lines as inputs
Operation: This command affects all eight lines of port A. The Direction value is written to the entire
port with each of the bits in the byte affecting the corresponding I/O line. To change a
single I/O line without affecting the others it is necessary to store the old value of the port
or read its current value before writing a new value with only the corresponding bits
changed. To set the entire port as outputs use Direction = 0 to set all as inputs use Direction
= 255 to set 0, 1, 2 and 3 as inputs and 4, 5, 6 and 7 as outputs use Direction = 15.
Example:
Winsock1.SendData “!A” + Chr$(Direction)