Other Parts Discussed in Thread: LMT86
Tool/software: Code Composer Studio
I receive the answer from ADC and this represent temperature read from LMT86 temperature sensor. ADC is set on 10 bits using driverlib:
void configurateADC(){
GPIO_setAsInputPin(GPIO_PORT_P8, GPIO_PIN0);
GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P8,GPIO_PIN0,GPIO_PRIMARY_MODULE_FUNCTION);
ADC_init(ADC_BASE,ADC_SAMPLEHOLDSOURCE_SC,ADC_CLOCKSOURCE_ADCOSC,ADC_CLOCKDIVIDER_1);
ADC_enable(ADC_BASE);
ADC_setupSamplingTimer(ADC_BASE,ADC_CYCLEHOLD_4_CYCLES,ADC_MULTIPLESAMPLESDISABLE);
ADC_setResolution(ADC_BASE,ADC_RESOLUTION_10BIT);
ADC_configureMemory(ADC_BASE, ADC_INPUT_A8,ADC_VREFPOS_AVCC,ADC_VREFNEG_AVSS);
__delay_cycles(5000);
}
I receive for example 563 and don't know how change this value in celsius degrees.