Hi,
i use the LM35 to read the temp.. And i use the ADC from CC1111 to change it or make it digital. And then i send it to my pc with uart. The sending isn't a porblem. But ADC or LM35 there is a problem. I send every time 00. But i have to send for example 27 degree. What can be wrong?
ADC configuration i did this:
ADCCON2 = ADCCON2_SREF_AVDD | ADCCON2_SDIV_256 | ADCCON2_SCH_AIN7;
ADCCON1 = STSEL_FULL_SPEED | BIT1 | BIT0;
ADCCFG |= ADCCFG_5;
adc_result = ADCL & 0xC0;
adc_result |= (ADCH << 8);
adc_result = adc_result *100; // the LM35 gives value of 0.25 for example. I multiplicate it with 100 to get 25 degree.
Do you think there is the problem? Or is my ADC configuration wrong?
Thank you