Other Parts Discussed in Thread: C2000WARE
Dear experts,
for my work I am programming the ADC module in accordance with the TI examples.
Here below the main settings:
ADC_setPrescaler(ADCD_BASE, ADC_CLK_DIV_4_0);
ADC_setMode(ADCD_BASE, ADC_RESOLUTION_12BIT, ADC_MODE_SINGLE_ENDED);
ADC_setInterruptPulseMode(ADCD_BASE, ADC_PULSE_END_OF_CONV);
ADC_enableConverter(ADCD_BASE);
DEVICE_DELAY_US(1000);
ADC_setupSOC(ADCD_BASE, ADC_SOC_NUMBER0, ADC_TRIGGER_SW_ONLY, ADC_SOC_NUMBER0, 15);
By considering VREFH=3V and VREFL=0V, a DC voltage equal to 1.4989V is converted in a digital code equal to 2044.
By calculation, the correct code would be 2046.
Please, note that the calibration of the device is made by means of the TI-function ADC_setMode.
Did I perform an error in programming the ADC?
Thank you in advance.
Best regards,
Benito