MCP356x 24-bit ADCs

Abierto
#840 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
embedded-iot, go
Área
embedded-iot

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Go
Estrellas
756
Forks
251
Merge medio
7 d 12 h
PR fusionados (30 d)
8

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de tinygo-org/drivers

Todos los issues de tinygo-org/drivers

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.