feat: Analog sensor configuration (pin modes + packet format) #49

Open
opened 2026-08-29 20:53:57 +00:00 by time · 0 comments
Contributor

Configure which pins are analog inputs and how they map into the transmitted packet, for the first sensor class: resistive (variable-resistance temperature sensors, e.g. thermistors) and direct voltage measurements.

The firmware already reads the on-chip temperature sensor, the FVR channel (to derive VDD), and an external analog channel (RA4) and packs them into the packet. This generalizes that: the user picks which pins are analog and how the resulting ADC values are scaled and placed in the packet.

Open questions:

  • pin-mode configuration (which of the available analog pins are enabled, and their ADC channel)
  • how to represent the packet format declaratively (so the host tool's decoder generator can consume it)
  • scaling: raw ADC, voltage (using the FVR→VDD derivation already in the firmware), or a calibrated value (e.g. thermistor R→T via Steinhart-Hart / lookup)
  • whether to support the capacitive sensing (CPS) peripheral here or defer it
Configure which pins are analog inputs and how they map into the transmitted packet, for the first sensor class: resistive (variable-resistance temperature sensors, e.g. thermistors) and direct voltage measurements. The firmware already reads the on-chip temperature sensor, the FVR channel (to derive VDD), and an external analog channel (RA4) and packs them into the packet. This generalizes that: the user picks which pins are analog and how the resulting ADC values are scaled and placed in the packet. Open questions: - pin-mode configuration (which of the available analog pins are enabled, and their ADC channel) - how to represent the packet format declaratively (so the host tool's decoder generator can consume it) - scaling: raw ADC, voltage (using the FVR→VDD derivation already in the firmware), or a calibrated value (e.g. thermistor R→T via Steinhart-Hart / lookup) - whether to support the capacitive sensing (CPS) peripheral here or defer it
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
daru/PICsense#49
No description provided.