MCP356x 24-bit ADCs

未关闭
#840 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
embedded-iot, go
领域
embedded-iot

调研方向

Read the MCP356x datasheet, the linked ESP32 C library, and TinyGo's existing MCP3008 driver. The issue proposes a new ADC driver but leaves key API and configuration choices open; first settle those and verify the author's single-ended readings. Done means a driver supports the MCP356x and has agreed defaults and a documented reading API.

由索引模型根据 Issue 内容生成。

描述

Hi,
I'd like to contribute a driver for the MCP356x ADCs. I have an 8-channel MCP3564 and PicoW (RP2040 & RP2350).
I'm taking a look at the datasheet, a C lib for ESP32 and the existing TinyGo driver for MCP3008.

I'm pretty green to the embedded space and low-level programming in general, but after some head banging and LLM help, I got some single-ended readings off one of the channels.

I do have a few (maybe obvious) questions to start. Since this is a 24-bit ADC, would consumers generally expect [channel].Get() to return

  • a scaled-up int32?
  • Or a uint32 and have them deal with the sign?
  • Or a scaled-down uint16 like the other ADCs and then expose a [channel].Get32() int32?

I did the two Get() uint16 and Get32() imt32 on the for spike, but I wasn't sure.

Also, this chip has a ton of configurable options. Does anyone have an idea about some sane defaults? I haven't used enough ADCs to get a feel for what's expected out of the box. It probably already has some default state, but whatever it was didn't work for my use-case. I just wanted to read a steady voltage off a pot using the internal VREF and clock. I kept getting 0's with the initial config, but honestly, there could have been a ton of other factors preventing the read.
I'll check the C lib and datasheet and see if there's any guidance there.

主要语言
Go
星标
756
派生
251
平均合并
7 天 12 小时
30 天内合并 PR
8

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

tinygo-org/drivers 的其他 Issue

查看 tinygo-org/drivers 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。