5.5.3 Set Digital Input and Read Port (|I,<hex16>)
Format: |I,<hex16>
Command |I 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 Table 6-5-1 TBD. The response to the |I 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 |
| 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 |
