Cover image
Try Now
2018-12-17

通过I2C接口使用STM32的MCP23017 I/O扩展器芯片的库

3 years

Works with Finder

0

Github Watches

6

Github Forks

15

Github Stars

MCP23017 library for STM32.

Library to use MCP23017 I/O Expander chip with STM32 via i2c interface.

       .---------.
GPB0<->|1  \_/ 28|<->GPA7
GPB1<->|         |<->GPA6
GPB2<->|    M    |<->GPA5
GPB3<->|    C    |<->GPA4
GPB4<->|    P    |<->GPA3
GPB5<->|    2    |<->GPA2
GPB6<->|    3    |<->GPA1
GPB7<->|    0    |<->GPA0
 VDD-->|    1    |-->INTA
 VSS-->|    7    |-->INTB
  NC---|         |-->~RESET
 SCL-->|         |<--A2
 SDA<->|         |<--A1
  NC---|14     15|<--A0
       '---------'

Example: Read bits from GPA then copy bits to GPB.

#include "mcp23017.h"

MCP23017_HandleTypeDef hmcp;

mcp23017_init(&hmcp, &hi2c1, MCP23017_ADDRESS_20); mcp23017_iodir(&hmcp, MCP23017_PORTA, MCP23017_IODIR_ALL_INPUT); mcp23017_iodir(&hmcp, MCP23017_PORTB, MCP23017_IODIR_ALL_OUTPUT);

while (1) { mcp23017_read_gpio(&hmcp, MCP23017_PORTA); hmcp.gpio[MCP23017_PORTB] = hmcp.gpio[MCP23017_PORTA]; mcp23017_write_gpio(&hmcp, MCP23017_PORTB); }

相关推荐

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

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

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

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

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

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

  • Lists Tailwind CSS classes in monospaced font

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

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

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

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

  • tomoyoshi hirata
  • Sony α7IIIマニュアルアシスタント

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

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

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

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

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

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

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

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

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

  • appcypher
  • 很棒的MCP服务器 - 模型上下文协议服务器的策划列表

    Reviews

    1 (1)
    Avatar
    user_FoSoqlxk
    2025-04-18

    I've been using the mcp23017 and it's been phenomenal for expanding my I/O capabilities. Ruda has done an excellent job with this product, making it straightforward to integrate into various projects. The documentation on GitHub is clear and comprehensive, which really helps in getting started quickly. Highly recommend it for anyone looking to enhance their microcontroller projects.