Other Parts Discussed in Thread: CC2650
Hello,
I have a question to the ADC accuracy on the CC2650MODA. I am using the TI project adcsinglechannel_CC2650_LAUNCHXL to measure the Input Voltage on my custom Hardware (with CC2650MODA).
I measured the Voltage with a failure of -100mV (At a input voltage of 1.6V).
Is there a way to increase the accuracy of the ADC?
I have configured the ADC in the following way:
typedef enum CC2650_LAUNCHXL_ADCName {
CC2650_LAUNCHXL_ADC0 = 0,
CC2650_LAUNCHXL_ADC1,
CC2650_LAUNCHXL_ADC2,
CC2650_LAUNCHXL_ADC3,
CC2650_LAUNCHXL_ADC4,
CC2650_LAUNCHXL_ADC5,
CC2650_LAUNCHXL_ADC6,
CC2650_LAUNCHXL_ADC7,
CC2650_LAUNCHXL_ADCDCOUPL,
CC2650_LAUNCHXL_ADCVSS,
CC2650_LAUNCHXL_ADCVDDS,
CC2650_LAUNCHXL_ADCCOUNT
} CC2650_LAUNCHXL_ADCName;
...
const ADCBufCC26XX_AdcChannelLutEntry ADCBufCC26XX_adcChannelLut[] = {
{PIN_UNASSIGNED, ADC_COMPB_IN_VDDS},
{PIN_UNASSIGNED, ADC_COMPB_IN_DCOUPL},
{PIN_UNASSIGNED, ADC_COMPB_IN_VSS},
{PIN_UNASSIGNED, ADC_COMPB_IN_AUXIO7},
{PIN_UNASSIGNED, ADC_COMPB_IN_AUXIO6},
{PIN_UNASSIGNED, ADC_COMPB_IN_AUXIO5},
{PIN_UNASSIGNED, ADC_COMPB_IN_AUXIO4},
{PIN_UNASSIGNED, ADC_COMPB_IN_AUXIO3},
{PIN_UNASSIGNED, ADC_COMPB_IN_AUXIO2},
{PIN_UNASSIGNED, ADC_COMPB_IN_AUXIO1},
{IOID_14, ADC_COMPB_IN_AUXIO0},
};
const ADCCC26XX_HWAttrs adcCC26xxHWAttrs[CC2650_LAUNCHXL_ADCCOUNT] = {
{
.adcDIO = IOID_14,
.adcCompBInput = ADC_COMPB_IN_AUXIO0,
.refSource = ADCCC26XX_FIXED_REFERENCE,
.samplingDuration = ADCCC26XX_SAMPLING_DURATION_682_US,
.inputScalingEnabled = true,
.triggerSource = ADCCC26XX_TRIGGER_MANUAL
},
...
Read out the ADC value
ADC_Params_init(¶ms);
adc = ADC_open(CC2650_LAUNCHXL_ADC0, ¶ms);
if (adc == NULL) {
System_abort("Error initializing ADC channel 1\n");
}
else {
System_printf("ADC channel 1 initialized\n");
}
for (i = 0; i < ADC_SAMPLE_COUNT; i++) {
res = ADC_convert(adc, &adcValue1[i]);
if (res == ADC_STATUS_SUCCESS) {
System_printf("ADC channel 1 convert result (%d): 0x%x\n", i,
adcValue1[i]);
}
else {
System_printf("ADC channel 1 convert failed (%d)\n", i);
}
System_flush();
}
ADC_close(adc);