5.5.3 Set Digital Input and Read Port (|I,<hex16>)

Format: |I,<hex16>

Command |I configures the pin as digital input and reads the input level of the pin in a single command execution. Command |I reads multiple digital I/O values. It expects one input parameter of digital I/O ports to read. The input parameter is the digital I/O pin bitmap in the 16-bit hex format. The following table provides details about the I/O pin bitmap format. The response to command |I is also a bitmap. If the corresponding pin to read is high, then the bit in the response is set; otherwise, the bit is cleared.

Table 5-29. Digital I/O Bitmap
BitmapRNBD451 Pins
0001GPIO_PIN_RA0
0002GPIO_PIN_RA1
0004Reserved
0008Reserved
0010GPIO_PIN_RA10
0020Reserved
0040Reserved
0080GPIO_PIN_RB8
0100GPIO_PIN_RB10
0200GPIO_PIN_RB11
0400GPIO_PIN_RB12
0800GPIO_PIN_RB13
Example:|I,0003

// Read digital I/O GPIO_PIN_RA0 and GPIO_PIN_RA1

// If the return value is 0002, then GPIO_PIN_RA0 is low and GPIO_PIN_RA1 is high

Response:AOK// Success
Err// Syntax error, invalid parameter