5.5.3 Set Digital Input and Read Port or Query Digital I/O Port

Table 5-75. Format
Firmware Version 1.0Firmware Version 1.2 and Later
|I,<hex16>

QIO,<hex16>

Note: All firmware version 1.0 syntax remains valid in version 1.2 and later.

Command |I or QIO reads multiple digital I/O values and anticipates a single input parameter representing the digital I/O ports to be read. The input parameter is the digital I/O pin bitmap in the 16-bit hex format, with the I/O pin bitmap format detailed in the following table. The response to the |I or QIO command is also a bitmap. If the corresponding pin to be read is high, the corresponding bit in the response is set; otherwise, the bit is cleared

Table 5-76. Digital I/O Bitmap
BitmapRNBD350 Pins
0001GPIO_PIN_RA3
0002GPIO_PIN_RA8
0004GPIO_PIN_RA9
0008GPIO_PIN_RA10
0010GPIO_PIN_RB4
0020GPIO_PIN_RB5
0040GPIO_PIN_RB8
ItemFirmware Version 1.0 and LaterDescription
Example:|I,0003

Read digital I/O GPIO_PIN_RA3 and GPIO_PIN_RA8.

If return value is 0002, GPIO_PIN_RA3 is low and GPIO_PIN_RA8 is high.

Response:AOKSuccess
ErrSyntax error, invalid parameter
ItemFirmware Version 1.2 and LaterDescription
Example:QIO,0003

Read digital I/O GPIO_PIN_RA3 and GPIO_PIN_RA8.

If return value is 0002, GPIO_PIN_RA3 is low and GPIO_PIN_RA8 is high.

Response:AOKSuccess
ErrSyntax error, invalid parameter