This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

I'm using 12 bit ADC, My max. Value is not reaching 4095 if I assume It takes 1 bit for Sign bit, then then my Max value should be less 2048, but it goes above that? Below is my code for ADC.

Other Parts Discussed in Thread: CC2650

Hi,

	/* Enabling the clock for ADC as the drivers are not handling it */
	AUXWUCClockEnable(AUX_WUC_MODCLKEN0_ANAIF_M|AUX_WUC_MODCLKEN0_AUX_ADI4_M);
	/*Selecting AUXI07 as ADC input pin. */
	AUXADCSelectInput(ADC_COMPB_IN_AUXIO7);

//	AUXADCEnableSync(AUXADC_REF_FIXED, AUXADC_SAMPLE_TIME_10P9_MS, AUXADC_TRIGGER_MANUAL);
	/*Asynchronous */
	AUXADCEnableAsync(AUXADC_REF_FIXED, AUXADC_TRIGGER_MANUAL);

	AUXADCGenManualTrigger();


	int32_t singleSample = AUXADCReadFifo();

	HWREGBITW(AUX_EVCTL_BASE + AUX_EVCTL_O_EVTOMCUFLAGSCLR, AUX_EVCTL_EVTOMCUFLAGSCLR_ADC_IRQ_BITN) = 1;

	int32_t adcOffset = AUXADCGetAdjustmentOffset(AUXADC_REF_FIXED);

	int32_t adcGainError = AUXADCGetAdjustmentGain(AUXADC_REF_FIXED);

	int32_t adcCorrectedValue = AUXADCAdjustValueForGainAndOffset(singleSample, adcGainError, adcOffset);

	int32_t adcMicroVoltValue = AUXADCValueToMicrovolts(AUXADC_FIXED_REF_VOLTAGE_NORMAL, adcCorrectedValue );

	System_printf("singleSample = %d, adcOffset = %d, adcGainError = %d, adcCorrectedValue = %d adcMicroVoltValue = %d\n",
			singleSample, adcOffset, adcGainError, adcCorrectedValue, adcMicroVoltValue);
	System_flush();