MCP cover image
See in Github
2018-01-31

使用MSB-或LSB模式使用Raspberry Pi读取MCP3201 12位A/D转换器的功能

0

Github Watches

6

Github Forks

10

Github Stars

raspi-MCP3201

This module provides functions to read the MCP3201 (2.7V 12-Bit A/D Converter with SPI Serial Interface).

Please refer to the datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/21290F.pdf

The MSB is clocked out on the falling edge of the 3rd clock pulse. After the first eight clocks have been sent to the device, the MCU receive buffer will contain two unknown bits (??), the null bit (NB), and the highest order five bits (B11-B7) of the conversion. After the second eight clocks have been sent, the receive buffer will contain the lowest order seven bits (B6-B0) and the B1 bit repeated as the A/D converter has begun to shift out LSB data with the extra (i.e. the 16th) clock.

Requires SPI:

dtparam=spi=on in /boot/config.txt

sudo pip3 install spidev (https://pypi.python.org/pypi/spidev)

Pin setup MCP3201:

VDD (8) --> 3V3

VREF(1) --> 3V3

VSS (4) --> GND

IN+ (2): positive analog input (min: IN-, max: VREF + IN-)

IN- (3): negative analog input (VSS +- 100 mV), connect to GND

Raspberry Pi (Model B2, Pi2, and Pi3):

CD/SHDN (5): chip select/shutdown --> Raspberry Pi BCM GPIO pin 8 (CE0)

CLK (7): serial clock --> Raspberry Pi BCM GPIO pin 11 (SCLK)

DOUT (6): serial data output --> Raspberry Pi GPIO BCM pin 9 (MISO)

相关推荐

  • 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

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

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

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

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

  • Lists Tailwind CSS classes in monospaced font

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • 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

    5 (1)
    Avatar
    user_bbTtIfFY
    2025-04-17

    The Raspi-MCP3201 by flohwie is a fantastic addition for anyone looking to add precise ADC capabilities to their Raspberry Pi projects. The integration is seamless, and the documentation on the GitHub page is thorough, making setup straightforward even for beginners. A highly recommended tool for anyone working with analog signals on a Raspberry Pi!