ZakKemble / libmcp2221

MCP2221 HID Library
https://blog.zakkemble.net/mcp2221-hid-library/
GNU General Public License v3.0
53 stars 14 forks source link

MCP2221 HID Library

This is a library for interfacing with the HID features of the MCP2221 USB to UART and I2C/SMBus serial converter from Microchip. The converter includes 4 GPIO pins, 3x 10-bit ADCs, 1x 5-bit DAC and more.

Microchip does provide a library for interfacing with the chip, however it is supplied as proprietary DLLs. This project aims to be an open-source and multi-platform alternative.

This library also makes use of HIDAPI.

Feature Status
ADC Supported
DAC Supported
GPIO Supported
Interrupt input Supported
Clock reference output Supported
USB Descriptors (Manufacturer, product, serial, VID, PID) Supported
I2C/SMB Limited support, WIP
Flash password protection Not yet implemented
C++ and C# wrappers Not yet implemented

Documentation

Doxygen pages

Hint:

Function prefix Description
mcp2221_set* Set SRAM config, this takes immediate effect
mcp2221_get* Get SRAM config
mcp2221_save* Writes to flash, this setting is used at startup
mcp2221_load* Read from flash
mcp2221_read* Read ADC/GPIO/interrupt values

Setting up

Using pre-built binaries

Compiling


Third party contents are copyrighted by their respective authors.

My productions are published under GNU GPL v3 (see License.txt).


MCP2221 HID Library


Zak Kemble

contact@zakkemble.co.uk