5.5.3 Set Digital Input and Read Port or Query Digital I/O Port
| Firmware Version 1.0 | Firmware Version 1.2 and Later |
|---|---|
|I,<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
| Bitmap | RNBD350 Pins |
|---|---|
| 0001 | GPIO_PIN_RA3 |
| 0002 | GPIO_PIN_RA8 |
| 0004 | GPIO_PIN_RA9 |
| 0008 | GPIO_PIN_RA10 |
| 0010 | GPIO_PIN_RB4 |
| 0020 | GPIO_PIN_RB5 |
| 0040 | GPIO_PIN_RB8 |
| Item | Firmware Version 1.0 and Later | Description |
|---|---|---|
| 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: | AOK | Success |
Err | Syntax error, invalid parameter |
| Item | Firmware Version 1.2 and Later | Description |
|---|---|---|
| Example: | | 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: | AOK | Success |
Err | Syntax error, invalid parameter |
