5.5.4 Set Digital Output Port (|O,<hex16>,<hex16>)

Format: |O,<hex16>,<hex16>

Command |O sets the output value of the digital I/O ports. It expects two input parameters. The first parameter is the bitmap of digital I/O ports, and the second parameter is the output value in the bitmap. The bitmap format is the same as in command |I (see Table 5-31). If the set GPIO pin is occupied by a function pin whose function is enabled, it will reply to an error response.

Example:|O,0003,0001

// Set digital I/O output on GPIO_PIN_RA3 and GPIO_PIN_RA8

// Set GPIO_PIN_RA3 high and GPIO_PIN_RA8 low

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