We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi all,
I have written a ADC program for LPC1768 microcontroller and for that I have used LM35 temperature sensor. After using conversion formula the output is different from the actual temperature present in the location. Kindly look into the below code and correct me something wrong with conversion formula.
int main() { int result; pll(); adc_init(); uart0_init(); while(1) { while((LPC_ADC->ADDR0 & (1<<31)) == 0); result = ((LPC_ADC->ADDR0 & (0x00000FFF0))>>4); result = result*3.3*100/4096; ascii_conv(result); } }
Thanks Bhaskar