LM 35 Source Code
unsigned int temp_res;
char txt[6];
void main()
{
trisa = 1; //assign port A as input
UART1_Init(9600); // to start serial communication
while(1)
{
temp_res = ADC_Read(0); // connect vout pin of temp sensor to A0 pin of pic
temp_res = temp_res * 0.48872;
WordToStr( temp_res,txt);
UART1_Write_Text(txt);
}
}
