5.5.4 Set Digital Output Port or Write Digital I/O Port

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

WIO,<hex16>,<hex16>

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

Command |O or WIO 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 or QIO (see Table 5-76). If the set GPIO pin is occupied by a function pin whose function is enabled, it will reply to an error response.

ItemFirmware Version 1.0 and LaterDescription
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:AOKSuccess
ErrSyntax error, invalid parameter
ItemFirmware Version 1.2 and LaterDescription
Example:WIO,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:AOKSuccess
ErrSyntax error, invalid parameter