MCP2221 / MCP2221A
The Microchip MCP2221/MCP2221A is a USB Full Speed to I2C and UART protocol converter. It enumerates as a USB HID device (no kernel driver required on Linux, macOS or Windows) and exposes an I2C master, a UART bridge, four GPIO pins, three ADC channels and one DAC channel over a single USB connection.
The MCP2221A is the current production variant. It is electrically identical to the original MCP2221 and uses the same USB VID/PID.
USB identifiers
| Field | Value |
|---|---|
| Vendor ID | 0x04D8 (Microchip Technology) |
| Product ID | 0x00DD |
| USB class | HID (03h) |
| Speed | Full Speed (12 Mbps) |
Pin functions
The MCP2221A has four general-purpose pins, GP0-GP3, each configurable as GPIO or as a dedicated peripheral function:
| Pin | GPIO | Alternate function |
|---|---|---|
| GP0 | GP0 | SSPND (USB suspend indicator)/LED UART RX |
| GP1 | GP1 | Clock output/ADC1/Interrupt (edge)/LED UART TX |
| GP2 | GP2 | ADC2/DAC1/USB configured indicator |
| GP3 | GP3 | ADC3/DAC2/LED I2C traffic |
SCL and SDA are dedicated I2C pins and are not shared with the GP pins.
Wiring
I2C
MCP2221A Target
SCL -> SCL (4.7 kOhm pull-up to VCC)
SDA <-> SDA (4.7 kOhm pull-up to VCC)
GND <-> GND
VCC -> VCC (3.3 V or 5 V depending on target)
The MCP2221A I2C pins are open-drain. External pull-up resistors are required. Use 4.7 kOhm for 100 kHz (standard mode) and 2.2 kOhm for 400 kHz (fast mode).
UART
MCP2221A Target
TX -> RX
RX <- TX
GND <-> GND
The UART bridge appears as a standard CDC-ACM serial port (/dev/ttyACM* on
Linux). No additional kernel module is needed.
Electrical characteristics
| Parameter | Value |
|---|---|
| Supply voltage | 3.0 V - 5.5 V |
| I/O voltage | 3.0 V - 5.5 V (not 5V-tolerant on 3.3 V boards) |
| I2C speed (standard) | 100 kHz |
| I2C speed (fast) | 400 kHz |
| UART baud rate | Up to 115200 baud (USB Full Speed limited) |
| ADC resolution | 10-bit (0-VDD or 0-1024 V/2048 V/4096 V ref) |
| DAC resolution | 5-bit (0-VDD or 0-1024 V/2048 V/4096 V ref) |
| GPIO current | +/-25 mA per pin, 100 mA total |
Linux setup (udev)
The MCP2221A enumerates as a USB HID device. Access to both the raw USB interface and the HID node requires a udev rule.
Standard Linux
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="00dd", MODE="0666"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="00dd", MODE="0666"' \
| sudo tee /etc/udev/rules.d/99-mcp2221.rules
sudo udevadm control --reload-rules
sudo udevadm trigger
Reconnect the adapter after reloading.
NixOS
Add to your NixOS configuration and rebuild:
services.udev.extraRules = ''
SUBSYSTEM=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="00dd", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="00dd", MODE="0666", GROUP="plugdev"
'';
The USB rule covers raw USB enumeration; the HID rule covers /dev/hidrawN
access needed for I2C, GPIO, ADC, and DAC operations.
Verifying the setup
# Confirm the kernel sees the device
lsusb | grep 04d8:00dd
# Check HID node permissions (should show crw-rw-rw-)
ls -la /dev/hidraw*
# Enumerate with iottack
iottack mcp2221 device
Plugins
| Plugin | Command | Purpose |
|---|---|---|
| mcp2221 device | iottack mcp2221 device | Enumerate connected MCP2221/MCP2221A adapters and report USB identity and capabilities |
| i2c scan | iottack i2c scan --adapter mcp2221 | Scan all 112 valid 7-bit I2C addresses (0x08–0x77) and report responding devices |