Datasheet

MCP2221
DS20005292B-page 50 2015 Microchip Technology Inc.
5 ADC Voltage Reference – this allows the user to modify the ADC reference voltage
Bit 7: Enable loading of a
new ADC reference
1 Bits 2-0 will be used for ADC reference voltage selection
0 ADC reference will remain unaltered
Bit 6-3 Don’t
care
Bit 2-1: These bits are
used to change the DAC
VRM voltage
11 VRM voltage is 4.096V (only if VDD is higher than this value)
10 VRM voltage is 2.048V
01 V
RM voltage is 1.024V
00 VRM voltage is off
Bit 0: This bit is used to
change the DAC
reference voltage
1 VDD ADC voltage reference is the internal ADC voltage reference
module (ADC V
RM)
0 ADC voltage reference is V
DD
6 Setup the interrupt detection mechanism and clear the detection flag – useful for preparing the interrupt
detection module to detect a new interrupt condition
Bit 7: Enable the
modification of the
interrupt detection
conditions
1 The interrupt detection settings and flag will change
0 The interrupt detection settings and flag will remain unchanged
Bit 6-5 Don’t
care
Bit 4 Enable the modification of the positive edge detection
Bit 3: The new value for
the positive edge
detector
1 Interrupt detection will trigger on positive edges
0 Interrupt detection will not trigger on positive edges
Bit 2 Enable the modification of the negative edge detection
Bit 1: The new value for
the negative edge
detector
1 Interrupt detection will trigger on negative edges
0 Interrupt detection will not trigger on negative edges
Bit 0: Clear the interrupt
detection flag
1 Clear the interrupt detection flag
0 Leave the interrupt detection flag as is
7 Alter GPIO configuration:
alters the current GP
designation
1 Alter the GP designation. The values from Byte Index 8 will be used to
load a new set of values into the SRAM GP settings.
0 Do not alter the current GP designation
8 GP0 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
Bit 3: GPIO Direction
(Input/Output) – 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 Alternate function 0 (LED UART RX)
001 Dedicated function operation (SSPND)
000 GPIO operation
TABLE 3-36: COMMAND STRUCTURE (CONTINUED)
Byte
Index
Function Description Value Effect