BP7 REV0 proto run

Hmm, is there a reason to believe that the ADC of the 7Rev0 is more noisy than the other versions?

Or was the limitation to one decimal place in the v command done because it already was this noisy on the previous versions?

I hacked the ADC code a bit to show me all digits and the values jump around like 100 mV or so. This is a bit more than I would have expected. The RP2350 even got the improved ADC in comparison to the RP2040.

--- a/src/commands/global/v_adc.c
+++ b/src/commands/global/v_adc.c
@@ -35,14 +35,14 @@ void adc_measure(struct command_result* res, bool refresh);
 uint32_t adc_print(uint8_t bio_pin, bool refresh) {
     // sweep adc
     amux_sweep();
-    printf("%s%s IO%d:%s %s%d.%d%sV\r%s",
+    printf("%s%s IO%d:%s %s%d.%03d%sV\r%s",
            ui_term_color_info(),
            GET_T(T_MODE_ADC_VOLTAGE),
            bio_pin,
            ui_term_color_reset(),
            ui_term_color_num_float(),
            ((*hw_pin_voltage_ordered[bio_pin + 1]) / 1000),
-           (((*hw_pin_voltage_ordered[bio_pin + 1]) % 1000) / 100),
+           (((*hw_pin_voltage_ordered[bio_pin + 1]) % 1000)),
            ui_term_color_reset(),
            (refresh ? "" : "\n"));
     return 1;

This is in preparation for port impedance measurements.

2 Likes