Skip to main content
Skip table of contents

PortStateRead: IOType=26

PortStateRead, 1 Command Byte: 





3 Response Bytes: 



This IOType reads the state of all digital I/O, where 0-7=FIO, 8-15=EIO, and 16-19=CIO. 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 FIO0-FIO2 are high, EIO0-EIO2 are high, CIO0 are high, and all other I/O are low (b000000010000011100000111), State=d67335.


# PortStateRead Feedback command
# Reads the state of all digital I/O.

import u3
d = u3.U3()
d.debug = True
# Sent:  [0x14, 0xf8, 0x1, 0x0, 0x1a, 0x0, 0x0, 0x1a]
# Response:  [0xeb, 0xf8, 0x3, 0x0, 0xee, 0x1, 0x0, 0x0, 0x0, 0xe0, 0xff, 0xf]
# [{'CIO': 15, 'FIO': 224, 'EIO': 255}]
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.