Other Parts Discussed in Thread: CC2530
Hi,
I'm now using the internal cc2530 VDD/3 to measure the voltage with internal ref 1.15v.
I found that different board test the same voltage ,but the adc value is different.
For example,the voltage need to be test is 2.84V
Board 1:the adc value is 1685
Board 2:he adc value is 1702
Board 3:he adc value is 1751
Board 4:he adc value is 1763
I don't know why the adc value ddifference is so big and I can't find any information about this issue.
void ReadBattery(void)
{
uint32 value;
ADCIF = 0;
ADCCON3 = (HAL_ADC_REF_125V | HAL_ADC_DEC_512 |HAL_ADC_CHN_VDD3);
while ( !ADCIF );
value = ADCH;
value = (value<< 8)|ADCL;
value = (value>>4);
value = (value * 115*3)/2048
DsInd.alarm[2] = (uint16)value>>8;
DsInd.alarm[3] = (uint16)value;
SampleApp_SendInMessage();
}
}

