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

ChrisLub
Tue Apr 23 2024, 05:21 pm
Davidbab
Tue Apr 23 2024, 10:41 am
Richardrit
Tue Apr 23 2024, 09:54 am
HenryLaf
Mon Apr 22 2024, 03:50 pm
bleradrar
Mon Apr 22 2024, 06:38 am
ppu-pro_ka
Sun Apr 21 2024, 07:39 pm
Infewow
Sun Apr 21 2024, 06:30 pm
HumanTak
Sun Apr 21 2024, 12:26 pm