Data Sheet
Ether I/O 24R Users Manual V1.1
Elexol Pty Ltd Version 1.1 Page 22 http://www.elexol.com
ELEXOL
ELECTRONIC SOL UT IONS
Command Set (continued)
Write Port C Pull Up Register
ASCII Code Bytes Data Function
@C 3 Enable Writes data to port’s direction register. Lines with a
corresponding bit value of 0 have their pull up resistors turned
on, lines with a bit value of 1 have their pull up resistors turned
off
The power up default for Enable is 255; all pull up resistors turned off
Operation: Same as Write Port A Pull Up Register
Example:
Winsock1.SendData “@C” + Chr$(Enable)
Write Port A Threshold Register
ASCII Code Bytes Data Function
#A 3 Select Writes data to port’s Threshold register. Lines with a
corresponding bit value of 0 have input threshold voltage set at
2.5V, lines with a bit value of 1 have their input threshold
voltage set to 1.4V
The power up default for Select is 255; all lines have a threshold of 1.4V
Operation: This command affects all eight lines of port A whose direction is set as an input. The
Select 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’s behaviour without affecting the others
it is necessary to store the old value of the register or read its current value before writing a
new value with only the corresponding bits changed. To set the entire port with threshold
voltage of 2.5V use Select = 0 to set all the ports input thresholds at 1.4V use Select = 255
to set 0, 1, 2 and 3 at 1.4V and 4, 5, 6 and 7 at 2.5V use Select = 15.
Example:
Winsock1.SendData “#A” + Chr$(Select)
Write Port B Threshold Register
ASCII Code Bytes Data Function
#B 3 Select Writes data to port’s Threshold register. Lines with a
corresponding bit value of 0 have input threshold voltage set at
2.5V, lines with bit value of 1 have their input threshold voltage
set to 1.4V
The power up default for Select is 255; all lines have a threshold of 1.4V
Operation: Same as Write Port A Threshold Register
Example:
Winsock1.SendData “#B” + Chr$(Select)
Write Port C Threshold Register
ASCII Code Bytes Data Function
#C 3 Select Writes data to port’s Threshold register. Lines with a
corresponding bit value of 0 have input threshold voltage set at
2.5V, lines with a bit value of 1 have their input threshold
voltage set to 1.4V
The power up default for Select is 255; all lines have a threshold of 1.4V
Operation: Same as Write Port A Threshold Register
Example:
Winsock1.SendData “#C” + Chr$(Select)