I'm doing a digital thermometer by using LM35DZ temperature sensor and PIC 16F877A microcontroller. Can anyone teach me how to use the ADC inside 16F877A to convert the output of the LM35DZ or can anyone share the code how to interface between the ADC and LM35DZ. Pls advise!
1. Enable the necesary pin as input, and configure as analog.
2. configure the ADC: read all about the configuration registers of ADC in the datasheet (select the channel, select the sample time,...)
3. read the ADC (enable ADC), and wait the data converted, this can be done by a loop or an interruption.
In google there is a lot of examples search by:
ADC example pic16f877