Based on ADC, how to calculate or how to convert from analog voltage to Celsius (digital values) which displayed on the LCD screen? Can you show or any an block diagram of ADC with PIC16F876A?
regards,
Kan
yonghui WROTE:analog channel which ADC reads, ADC will sample n digitize the analog value, dont worry the code to convert analog value to digital, just read the ADC buffer value, it is digital.
u can use the value get from the adc read function.
after u get the value which adc read, then u can refer the datasheet of the temperature sensor, what is the relation between the voltage reading the temperature. for LM35 it will be linear relation, so just divide or multiply some constant value u get from the datasheet u will get the temperature in celcius.
then display the value to LCD. u will need to convert the value into BCD and to the ascii code. mayb u can directly use some LCD function there.
putu WROTE:Can you please let me know how I can see the temperature reading/ADC value of the sensors using the MPlab IDE software? I want to see in real time that these value change as the temperature increase or decrease. For debugging / troubleshooting purposes. Thanks!
Users browsing this forum: No registered users and 8 guests