reise
Newbie level 2
Hello! I am attempting to use the GPIOs on the Xport to control a set of relays. However, I have not been able to figure out how to change the state of my Xport's GPIOs.
Using the DeviceInstaller I am able to change the configuration from Active Low to Active High, but I am not able to change the states dynamically.
the User Guide says "states can be dynamically controlled and probed through special port 77F0."
I have been trying to communicate with the XPort using telnet, via PuTTy and MATLAB, but have had no luck getting these GPIOs to respond.
I tried, with no luck, reproduce their example 2, which says:
"Example 2: PC sends command 1Bh to change the current states of GPIO 0 and 1.
PC -> XPort: 1Bh, 01h, 00h, 00h, 00h, 00h, 00h, 00h, 00h
XPort -> PC: 1Bh, 05h, 00h, 00h, 00h
Command details:
1Bh = command 1Bh
01h, 00h, 00h, 00h = the mask that determines which GPIOs will be changed.
bit 0 is 1 → GPIO0 will be changed.
bit 1 is 0 → GPIO1 will remain the same.
00h, 00h, 00h, 00h = the new states
bit 0 is 0 → GPIO0 will become 0.
bit 1 is ignored since it is masked out.
Response details:
1Bh = response to command 1Bh
05h, 00h, 00h, 00h =
bit 0 is 1 → GPIO0 = 1
bit 1 is 0 → GPIO1 = 0
bit 2 is 1 → GPIO2 = 1
The other bits are ignored because there are only three configurable pins on
the XPort module."
When I tried this I attempted to send the commands in hex as shown, and in binary but had no luck. When I connect to port 10001 and send command I am able to see the serial data on the TXD pin using my OScope, but they have no affect.
I did notice that when sending commands to port 10001 there are extra characters appended to the end of the bit stream (CR,LF, or ")" ).
If anyone has experience with XPort's GPIOs please help!
Thank you!
Using the DeviceInstaller I am able to change the configuration from Active Low to Active High, but I am not able to change the states dynamically.
the User Guide says "states can be dynamically controlled and probed through special port 77F0."
I have been trying to communicate with the XPort using telnet, via PuTTy and MATLAB, but have had no luck getting these GPIOs to respond.
I tried, with no luck, reproduce their example 2, which says:
"Example 2: PC sends command 1Bh to change the current states of GPIO 0 and 1.
PC -> XPort: 1Bh, 01h, 00h, 00h, 00h, 00h, 00h, 00h, 00h
XPort -> PC: 1Bh, 05h, 00h, 00h, 00h
Command details:
1Bh = command 1Bh
01h, 00h, 00h, 00h = the mask that determines which GPIOs will be changed.
bit 0 is 1 → GPIO0 will be changed.
bit 1 is 0 → GPIO1 will remain the same.
00h, 00h, 00h, 00h = the new states
bit 0 is 0 → GPIO0 will become 0.
bit 1 is ignored since it is masked out.
Response details:
1Bh = response to command 1Bh
05h, 00h, 00h, 00h =
bit 0 is 1 → GPIO0 = 1
bit 1 is 0 → GPIO1 = 0
bit 2 is 1 → GPIO2 = 1
The other bits are ignored because there are only three configurable pins on
the XPort module."
When I tried this I attempted to send the commands in hex as shown, and in binary but had no luck. When I connect to port 10001 and send command I am able to see the serial data on the TXD pin using my OScope, but they have no affect.
I did notice that when sending commands to port 10001 there are extra characters appended to the end of the bit stream (CR,LF, or ")" ).
If anyone has experience with XPort's GPIOs please help!
Thank you!