MCP cover image
See in Github
2020-08-27

MCP2221 USB至I2C/UART桥IC的C示例的集合,带有不同的串行模块和传感器

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

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • 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
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

    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.