« Close

Datasheets and User Guides

App Notes

Software & Driver

 

5.2.5.11 - PortStateRead: IOType=26

Table 5.2.5.11-1. PortStateRead Command Response

PortStateRead, 1 Command Byte: 
0 IOType = 26
   
3 Response Bytes: 
0-2 State

This IOType reads the state of all digital I/O, where 0-7=FIO, 8-15=EIO, and 16-19=CIO. Note that CIO0-2 and MIO0-2 are shared, so for reads of MIO0-2 look at 16-18. Only lines configured as digital (not analog) return valid readings.

  • State: Each bit of this value corresponds to the specified bit of I/O such that 1=High and 0=Low. If all are low, State=d0. If all 20 standard digital I/O are high, State=d1048575. If FIO0-FIO2 are high, EIO0-EIO2 are high, CIO0 is high, and all other I/O are low (b00010000011100000111), State=d67335.