Just starting to program my 8 channel usb gpio. I have used 3 separate Windows based terminal programs and always get the same results, which are verified with the use of a volt meter: 1) Send "gpio set 0". GPIO 0 goes high 2) Send "gpio read 0". Response is "1". 3) GPIO 0 goes low, as if you had sent "gpio clear 0". Is this by design? If so, I can not read a GPIO port that is high without causing it to go low.
So evidently this is by design. It would appear that the read command is really to switch the port from digital I/O to analog input. Next issue: when I read the module ID, I get 12345678. When I write a new I'd number, say 87654321, and read the ID the first time, it reports the value I wrote. But if you read the ID again, it reverts back to the 12345678 value, which more or less makes setting the module ID worthless. Am I doing something wrong?
Hi Tony, The behavior that you have noticed while reading the GPIO is by design. When a gpio read command is executed, the IO will be switched to input mode automatically and that will cause the IO to be in high impedance state. This will in turn cause the IO to loose it's state previously set using gpio set/clear commands. We have never noticed the behavior that mentioned above with id get command though. I picked up a gpio module to test it myself and found the command is working as expected as we can see in the image below. Can you please share what firmware version do you have on your device ? Thanks, Tom Numato Lab
Sorry for the delay in my response. My module firmware version is apparently 00000008 (see attached screen shot). In communication with the module, either using a terminal program (Putty) or my own software, using the GET function after using the SET function always appears to return the original ID string of "12345678", as shown in the screen capture below: If it makes a difference this is on a Win10 x64 PC with the latest version of Windows 10. To circle back to the READ function, there is apparently no way to read the value of a port (high/low) in the digital output mode without converting the port into the analog input mode?
So I just upgraded to Version 9 of the firmware. The GET function returns the 8 characters input by the SET function, but only once. After one GET request, the value returned is 0000000. For example: ID SET 12345678 ID GET 12345678 ID GET 00000000 So it would appear that the register that holds the ID value is reset after being read once.