Datasheet

2014 Microchip Technology Inc. DS20005292A-page 35
MCP2221
TABLE 3-13: SUB-COMMAND STRUCTURE – WRITE GP SETTINGS SUB-COMMAND
Byte
Index
Function Description Value Effect
0 0xB1 Write Flash Data – command code
1 0x00 Write Chip Settings – it will write the MCP2221 NVRAM
device settings
2 GP0 Power-up Settings
Bit 7-5: Don’t care
Bit 4: GPIO Output value When GP0 is set as an output GPIO, this value will be
present at the GP0 pin at Power-up/Reset.
Bit 3: GPIO Direction (Input/Out-
put). Works only when GP0 is set
for GPIO operation.
1 GPIO Input mode
0 GPIO Output mode
Bit 2-0: GP0 Designation 111-011 Don’t care
010 Dedicated function operation (SSPND)
001 Alternate function 1 (LED UART RX)
000 GPIO operation
3 GP1 Power-up Settings
Bit 7-5: Don’t care
Bit 4: GPIO Output value When GP1 is set as an output GPIO, this value will be
present at the GP1 pin at Power-up/Reset.
Bit 3: GPIO Direction (Input/Out-
put). Works only when GP1 is set
for GPIO operation.
1 GPIO Input mode
0 GPIO Output mode
Bit 2-0: GP1 Designation 111-101 Don’t care
100 Alternate function 3 (Interrupt Detection)
011 Alternate function 2 (LED UART TX)
010 Alternate function 1 (ADC 1)
001 Dedicated function operation (Clock Output)
000 GPIO operation
4 GP2 Power-up Settings
Bit 7-5: Don’t care
Bit 4: GPIO Output value When GP2 is set as an output GPIO, this value will be
present at the GP2 pin at Power-up/Reset.
Bit 3: GPIO Direction (Input/Out-
put). Works only when GP2 is set
for GPIO operation.
1 GPIO Input mode
0 GPIO Output mode
Bit 2-0: GP2 Designation 111-100 Don’t care
011 Alternate function 2 (DAC1)
010 Alternate function 1 (ADC2)
001 Dedicated function operation (USBCFG)
000 GPIO operation