Datasheet

MCP2221
DS20005292A-page 46 2014 Microchip Technology Inc.
3.1.11.1 Responses
15 GP3 output value 0x00 GP3 (if set up for GPIO output operation) will take a logical value of ‘0’.
Any other
value
GP3 (if set up for GPIO output operation) will take a logical value of ‘1’.
16 Alter GP3 pin direction
(enable/disable)
0x00 Leave the GP3 GPIO designation as is (input or output)
Any other
value
The next byte (index 17) will be the value used to set GP3’s pin direction
(only if GP3 is set for GPIO operation)
17 GP3 pin direction
(input or output)
0x00 Set GP3 GPIO as output.
Any other
value
GP3 (if set up for GPIO operation) will be set as a digital input.
18-63 Reserved 0x00
TABLE 3-33: RESPONSE 1 STRUCTURE
Byte
Index
Function
Description
Value Effect
0 0x50 Set GPIO Output Values – command code
1 0x00 Command completed successfully
2 Alter GP0 output
(enable/disable) status
0xEE If GP0 is not set for GPIO operation
Any other
value
If GP0 is already set for GPIO operation, the value will be copied from
the same byte index in the command structure.
3 GP0 output value status 0xEE If GP0 is not set for GPIO operation.
Any other
value
If GP0 is already set for GPIO operation, the value will be copied from
the same byte index in the command structure.
4 Alter GP0 pin direction
(enable/disable)
0xEE If GP0 is not set for GPIO operation.
Any other
value
If GP0 is already set for GPIO operation, the value will be copied from
the same byte index in the command structure.
5 GP1 pin direction
(input or output)
0xEE If GP1 is not set for GPIO operation.
Any other
value
If GP1 is already set for GPIO operation, the value will be copied from
the same byte index in the command structure.
6 Alter GP1 output
(enable/disable) status
0xEE If GP1 is not set for GPIO operation.
Any other
value
If GP1 is already set for GPIO operation, the value will be copied from
the same byte index in the command structure.
7 GP1 output value status 0xEE If GP1 is not set for GPIO operation.
Any other
value
If GP1 is already set for GPIO operation, the value will be copied from
the same byte index in the command structure.
8 Alter GP1 pin direction
(enable/disable)
0xEE If GP1 is not set for GPIO operation.
Any other
value
If the GP1 is already set for GPIO operation, the value will be copied
from the same byte index in the command structure.
9 GP1 pin direction
(input or output)
0xEE If GP1 is not set for GPIO operation.
Any other
value
If GP1 is already set for GPIO operation, the value will be copied from
the same byte index in the command structure.
10 Alter GP2 output
(enable/disable) status
0xEE If GP2 is not set for GPIO operation.
Any other
value
If GP2 is already set for GPIO operation, the value will be copied from
the same byte index in the command structure.
TABLE 3-32: COMMAND STRUCTURE (CONTINUED)
Byte
Index
Function
Description
Value Effect