Hello everyone, I am working with TMS5700432 HDK. I would like to read ADC value and convert it to degrees Celsius. I applied formulas on the forums for conversion; however, the results is wrong and in the hex (rether than in decimal as expected). May somebody recommend me other formula? This is my code:
adcData_t adc_data; adcData_t *adc_data_ptr = &adc_data; /** - Start Group1 ADC Conversion * Select Channel 8 - Temprature Sensor for Conversion */ adcStartConversion_selChn(adcREG1, Temperature_Sensor, 1, adcGROUP1); /** - Wait for ADC Group1 conversion to complete */ while(!adcIsConversionComplete(adcREG1, adcGROUP1)); /** - Read the conversion result * The data contains the Temprature sensor data */ adcGetSingleData(adcREG1, adcGROUP1, adc_data_ptr); /** - Transnmit the Conversion data to PC using SCI */ temp= adc_data_ptr->value*423/1024 - 278; sciSend_32bitdata(scilinREG, ((unsigned int) (temp)));
Is there anyone ever do this problem before. How can we read the temperature correctly?