jancumps / pico_scpi_usbtmc_labtool

LabVIEW compatible instrument on a Raspberry Pico
https://github.com/jancumps/pico_scpi_usbtmc_labtool/wiki
MIT License
13 stars 17 forks source link

adc #6

Closed jancumps closed 1 year ago

jancumps commented 1 year ago

ANALOG:INP0:RAW? to return the raw ADC value of the first ADC pin in array of analogue input pins

API to reside in src/adc look for placeholders and TODO in scpi-def.c and adc_utils.c

If real voltage to be returned, then there is a different SCPI command for it:

ANALOG:INP0:VOLTage?
MEASure:VOLTage:DC?
    // 12-bit conversion, assume max value == ADC_VREF == 3.3 V
    const float conversion_factor = 3.3f / (1 << 12);