Discussion in "PIC Microcontroller Discussion" started by    Destructionxman    Apr 2, 2008.
Wed Apr 02 2008, 07:56 pm
#1
Can anyone help me..
Am using PIC16F877A and am using ADRESL and ADRESH for geting back the result.
Am having 10mv per degree celcius resolution.10 bit value is in different register.
So how to convert it back...
PROJECT is Temperature monitoring in a two seven sement display using LM35 sensor.
Wed Apr 02 2008, 09:04 pm
#2
first you need to find out what is the voltage for single step..
i.e. if ADC value changes from 0 to 1, then what is the value of voltage during that step.

you already know that 10mV = 1 degree so.. you can easily calibrate the ADC value to temperature.

Is this what you are asking?
Wed Apr 02 2008, 09:11 pm
#3
What Vref have you chosen?
Suppose your Vref is 1.023v(or 1023mV).Your step size is therefore 1023mV\2^10.
Step size = 1mV.
Now you multiply this step size to the 10 bit value in the ADRESL and ADRESH to get the Vin value.
So suppose you get a value 0x3E7 (or 999 decimal),you multiply it with ss 1mv.
Thus Vin = 999x1=999mV.
Then temp = 999\10=99.9deg

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Bobbyerilar
Thu Mar 28 2024, 08:08 am
pb58
Thu Mar 28 2024, 05:54 am
Clarazkafup
Thu Mar 28 2024, 02:24 am
Walterkic
Thu Mar 28 2024, 01:19 am
Davidusawn
Wed Mar 27 2024, 08:30 pm
Richardsop
Tue Mar 26 2024, 10:33 pm
Stevencog
Tue Mar 26 2024, 04:26 pm
Bernardwarge
Tue Mar 26 2024, 11:15 am