Tool/software: Code Composer Studio
Hi,
I am trying to connect the DHT11 temperature sensor through ADC pins. I have gone through ADC demo example also.
But, I am not getting the ADC values through these pins. I know that voltage of these pins are 1.47 V. I am getting ulSample values 536092136. I don't think so the values are correct.
Can I know, what am I doing wrong here? Because, I have connected the same sensor with raspberry pi 3 and as well as Arduino.
PinTypeADC(PIN_58, 0xFF); ADCChannelEnable(ADC_BASE, ADC_CH_1); ADCTimerConfig(ADC_BASE, 2^17); ADCTimerEnable(ADC_BASE); ADCEnable(ADC_BASE); if( ADCFIFOLvlGet(ADC_BASE, ADC_CH_1) ) { ulSample = ADCFIFORead(ADC_BASE, ADC_CH_1); ulSample = (ulSample & 0x3ffc)>>2; output_voltage = (float)ulSample; }