MCP356x 24-bit ADCs

Đang mở
#840 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
embedded-iot, go
Lĩnh vực
embedded-iot

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Go
Star
756
Fork
251
Merge trung bình
7 ngày 12 giờ
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tinygo-org/drivers

Tất cả issue của tinygo-org/drivers

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.