Hello!
I'm using a 10k NTC like the image on a PIC18F4550 , with the circuit of another image.
I researched a bit and found the code below, but it puts values for "A" , "B" and " C " I did not understand how I can get .
a = 0,0011303
b = 0,0002339
c = 0,00000008863
I'm using a 10k NTC like the image on a PIC18F4550 , with the circuit of another image.
I researched a bit and found the code below, but it puts values for "A" , "B" and " C " I did not understand how I can get .
a = 0,0011303
b = 0,0002339
c = 0,00000008863
Code:
sensor =ADRES;
sensor *=5;
sensor/=1023;
rntc=33000/sensor;//RNTC=(Vcc*R1/Vin)-R1
rntc=rntc-10000;//
b1=log(rntc);//LN(RNTC)
b1=b1*b;//b*LN(RNTC)
c1=log(rntc);//LN(RNTC)
c1=pow(c1,3);//LN(RNTC)^3
c1=c1*c;//c*(LN(RNTC)^3)
temp=a+b1+c1;//a+b*LN(RNTC)+c*(LN(RNTC)^3)
temp=1/temp;//1/(a+b*LN(RNTC)+c*(LN(RNTC)^3))
temp=temp-273.15;