Data Sheet

Ether I/O 24R Users Manual V1.1
Elexol Pty Ltd Version 1.1 Page 23 http://www.elexol.com
ELEXOL
ELECTRONIC SOL UT IONS
Command Set (continued)
Write Port A Schmitt Trigger Register
ASCII Code Bytes Data Function
$A 3 Enable Writes data to port’s Schmitt trigger enable register. Lines with a
corresponding bit value of 0 have their Schmitt trigger threshold
latches turned on, lines with a bit value of 1 have normal
threshold sense inputs
The power up default for Enable is 255; all line Schmitt triggers are disabled
Operation: This command affects all eight lines of port A whose direction is set as an input. The
Enable 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 other
lines 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
Schmitt trigger inputs turned on use Enable = 0 to turn all the Schmitt trigger inputs off use
Enable = 255 and to set 0, 1, 2 and 3 as Schmitt trigger inputs and 4, 5, 6 and 7 as normal
threshold inputs use Enable = 240.
Example:
Winsock1.SendData “$A” + Chr$(Enable)
Write Port B Schmitt Trigger Register
ASCII Code Bytes Data Function
$B 3 Enable Writes data to port’s Schmitt trigger enable register. Lines with
a corresponding bit value of 0 have their Schmitt trigger
threshold latches turned on, lines with a bit value of 1 have
normal threshold sense inputs
The power up default for Enable is 255; all line Schmitt triggers are disabled
Operation: Same as Write Port A Schmitt Trigger Register
Example:
Winsock1.SendData “$B” + Chr$(Enable)
Write Port C Schmitt Trigger Register
ASCII Code Bytes Data Function
$C 3 Enable Writes data to port’s Schmitt trigger enable register. Lines with
a corresponding bit value of 0 have their Schmitt trigger
threshold latches turned on, lines with a bit value of 1 have
normal threshold sense inputs
The power up default for Enable is 255; all line Schmitt triggers are disabled
Operation: Same as Write Port A Schmitt Trigger Register
Example:
Winsock1.SendData “$C” + Chr$(Enable)
Read Port A
Command
Sent
ASCII
Code
Bytes Data Function
Sends the Value of Port A back to the host
a 1 -
Command
Reply
ASCII
Code
Bytes Data
A 2 Port-Value
Operation: The Value of the 8 lines of Port A is read and sent back to the host. Those pins that are set
as outputs are read as though they were inputs and their values sent back in the Port Value
Byte.
Example:
Winsock1.SendData “a”