This guide will show you how to use an MCP2221(A) to connect to I2C sensors and breakouts from your desktop PC running Windows, Mac OSX, or Linux. The MCP2221 also allows for general purpose digital input and output (GPIO) for things like buttons and LEDs, analog to digital conversion (ADC), and digital to analog (DAC).

The cool part about this is that you can then use any of the CircuitPython Libraries that have been written for the numerous I2C sensors and breakouts. You can bring that data directly into your PC for any kind of powerful analysis or presentation.

Our breakout uses the MCP2221A chip, but we may refer to it as MCP2221 as the difference are not relevant to using Blinka/CircuitPython libraries and use can use either version of the chip!

CircuitPython and CircuitPython Libraries

As you are going through this guide, keep in mind the difference between CircuitPython and CircuitPython Libraries:

There are various hardware combinations that allow for running CircuitPython and CircuitPython Libraries. In this guide we will not be using the actual CircuitPython firmware. But we will be using CircuitPython Libraries.

CircuitPython Libraries on Personal Computers

This is essentially the same idea as discussed  in the FT232H Guide. How can we directly connect common hardware items like buttons and I2C breakouts to a PC?

The MCP2221 provides another way to do this by utilizing the USB bus. The MCP2221 just makes different trade offs relative to the FT232H. The biggest being no hardware SPI support. But you do gain ADC and DAC support. Also, it's much cheaper than the FT232H.

So you end up with something like this:

Great! Let's get everything setup so we can actually do some fun stuff.

Adafruit MCP2221A Breakout - General Purpose USB to GPIO ADC I2C connected to a computer with an IMU sensor that is streaming data to some graphing program
Wouldn't it be cool to drive a tiny OLED display, read a
$6.50
In Stock

This guide was first published on Dec 22, 2019. It was last updated on Mar 08, 2024.

This page (Overview) was last updated on Mar 08, 2024.

Text editor powered by tinymce.