Datasheet

MCP2221
DS20005292A-page 20 2014 Microchip Technology Inc.
1.8 GPIO/ADC/DAC Module
This module communicates with the USB HID sub-
module through the Bus Matrix Module. It allows the
manipulation of GPIOs, retrieving the ADC data and
setting the DAC value.
1.8.1 GPIO
When the GPs are configured for GPIO operation,
those configured GPs can be used as digital inputs or
outputs.
When working as outputs, the GPs output logic levels
(logic 0 or 1).
1.8.1.1 VRM
The ADC and DAC sub-modules have each a voltage
reference module (V
RM). Each VRM can be configured
(at Power-up and runtime) to output one of the four
voltage choices available.
The V
RM can provide the following voltages as a refer-
ence:
•V
DD – the VRM output is exactly the voltage pres-
ent at the V
DD pin of the MCP2221. It can take
any value from 3.3 to 5V
1.024V – the V
RM output of 1.024V is obtained
from an internal voltage reference
2.048V – the V
RM output of 2.048V is obtained
from an internal voltage reference
4.096V – the V
RM output of 4.096V is obtained
from an internal voltage reference. If the V
DD is
lower than 4.096V, the V
RM output will have the
value of V
DD.
1.8.2 ADC CONVERTER
The ADC converter is producing 10-bit values and it
uses its own V
RM module.
It features three external channels (connected to
GP1/2/3 if configured for ADC operation).
The sampling rate of the ADC is around 1000 sps.
FIGURE 1-6: ADC SUB-MODULE
DETAILS.
1.8.3 DAC CONVERTER
The DAC is 5-bit wide and has a single analog output
and it uses its own VRM module.
The DAC output voltage can be routed to GP2/3 (if
GP2/3 are configured for DAC operation).
If the GP2 and GP3 are configured for DAC operation,
they will present the same analog voltage value
because they are connected to the same DAC output.
FIGURE 1-7: DAC SUB-MODULE
DETAILS
10-bit ADC
3 ext. Channels
VRM
OFF
1.024V
2.048V
4.096V
10-bit
VDD
CHIPSETTING3<2>
CHIPSETTING3<4:3>
Analog Mux
value
5-bit DAC
5-bit value
VRM
OFF
1.024V
2.048V
4.096V
analog
V
DD
CHIPSETTING2<5>
CHIPSETTING2<7:6>
Analog Mux
output