MCP cover image
MCP2221-Examples-for-Windows logo
Private

MCP2221-Examples-for-Windows

See in Github
2020-08-27

A collection of C examples for MCP2221 USB-to-I2C/UART bridge IC with different serial modules and sensors

1

Github Watches

8

Github Forks

14

Github Stars

This repository has all examples I have developed for the MCP2221 USB-to-I2C/UART chip from Microchip. This chip is like a swiss army knife that you can use to proof of concept any new I2C or UART based system, whether it's a chip or a full embedded system. All examples compile and run under Windows OS, all examples use Microchip library and DLL for the MCP2221 available at: https://www.microchip.com/wwwproducts/en/MCP2221A

The examples are for interfacing the MCP2221 via I2C with following sensors/modules:

  • MCP4725 12-bit D/A.
  • 16x2 I2C Character LCD (PCF8574).
  • MCP9808 digital output temperature sensor.
  • MMA8452q 3-Axis accelerometer.
  • MLX90614 Remote IR temperature sensor.
  • INA219 digital output power monitor.
  • AMC6821 stand-alone PWM Controller.
  • MCP23008 and MCP23018 I2C I/O Expanders.
  • I2C scanner, scans I2C bus and lists all connected slave devices.

To use the examples under Linux you might need to look into setting up the MCP2221 as an I2C adapter then use existing I2C functions in Linux native C headers. These are the steps to set up the MCP2221 as an I2C adapter (tested on Raspberry Pi):

  • sudo apt-get upgrade
  • sudo apt-get install raspberrypi-kernel-headers
  • wget http://ww1.microchip.com/downloads/en/DeviceDoc/mcp2221_0_1.tar.gz
  • tar -xf mcp2221_0_1.tar.gz
  • cd /"mcp2221_directory"/
  • make modules
  • sudo make install
  • Override linux driver with MCP2221 driver by creating usb device rule: sudo nano /etc/udev/rules.d/100-usb.rules
  • Add this line: ACTION=="add", SUBSYSTEM=="usb", DRIVER=="usb", RUN+="/directory/to/mcp2221/driver/driver_load.sh"
  • Restart udev services: sudo service udev restart

相关推荐

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • Lists Tailwind CSS classes in monospaced font

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

  • apappascs
  • Discover the most comprehensive and up-to-date collection of MCP servers in the market. This repository serves as a centralized hub, offering an extensive catalog of open-source and proprietary MCP servers, complete with features, documentation links, and contributors.

  • ShrimpingIt
  • Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx

  • Mintplex-Labs
  • The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.

  • ravitemer
  • A powerful Neovim plugin for managing MCP (Model Context Protocol) servers

  • jae-jae
  • MCP server for fetch web page content using Playwright headless browser.

  • patruff
  • Bridge between Ollama and MCP servers, enabling local LLMs to use Model Context Protocol tools

  • pontusab
  • The Cursor & Windsurf community, find rules and MCPs

  • n8n-io
  • Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的LLM资料总结(Agent框架、辅助编程、数据处理、模型训练、模型推理、o1 模型、MCP、小语言模型、视觉语言模型) | Summary of the world's best LLM resources.

    Reviews

    3 (1)
    Avatar
    user_bAhVFYzR
    2025-04-17

    The MCP2221-Examples-for-Windows by kelray is an excellent resource for anyone working with MCP2221 on a Windows platform. The repository is well-organized and the examples are clear and easy to follow. Whether you're a beginner or an experienced user, you'll find this a valuable tool to help you get the most out of your MCP2221 projects. Highly recommended! Check it out on GitHub: https://github.com/kelray/MCP2221-Examples-for-Windows.