« Close

Datasheets and User Guides

App Notes

Software & Driver

 

5.2.5.12 - PortStateWrite: IOType=27

Table 5.2.5.12-1. PortStateWrite Command Response

PortStateWrite, 7 Command Bytes: 
0 IOType = 27
1-3 WriteMask
4-6 State
   
0 Response Bytes: 

This IOType writes 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 writes to MIO0-2 use channel numbers 16-18. The direction of the selected lines is forced to output.

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