Dear forumers
Now i can't find the 10k thermistor so i do have the 150k NTC thermistor
now i want to couple this 150k thermistor with 0.1uF capacitor and look into the Myke Predko code and modify it and it cant work and showing too hot
below is the fraction of code and i do not know which to change to get the actual recharging time for that
attached is the whole ASM code
Now i can't find the 10k thermistor so i do have the 150k NTC thermistor
now i want to couple this 150k thermistor with 0.1uF capacitor and look into the Myke Predko code and modify it and it cant work and showing too hot
below is the fraction of code and i do not know which to change to get the actual recharging time for that
Loop ; Read Temperature and Loop Back Here
bsf PORTB, 7 ; Charge the Capacitor
bcf INTCON, GIE ; Turn Off Interrupts During Sensor Read
bsf STATUS, RP0 ; Charge the Capacitor
bcf TRISB & 0x07F, 7
movlw 0x032
movwf Value
decfsz Value, f
goto $ - 1
bsf TRISB & 0x07F, 7 ; Allow the Cap to Discharge
bcf STATUS, RP0
clrf Value ; Now, Read the Value
TLoop ; Wait for the Cap to Discharge through
btfss PORTB, 7 ; Variable Resistor
goto HaveValue ; Jump Out if the Value == 0
incfsz Value, f ; Increment the Time
goto TLoop ; Check again if No TimeOut
TooCold ; Value is Too Cold
movlw 13 ; TimeOut, Value is too Low (cold)
movwf Seg0 ; to Display
movwf Seg1
movwf Seg2
goto Display
HaveValue ; We have the Value - Calibrate it
movf Cal, w ; Now, Use Calibration Value for Multiplier
movwf Mul
movf Calhi, w
movwf Mulhi
clrf Prod ; 16 Bit Multiply with Result in "Prodhi"
clrf Prodhi
movlw 8 ; But, Multiplicand is only 8 bits
movwf Count
MulLoop ; Loop Around Here for Each Bit
rrf Value, f ; Do we add Value to the Product?
btfss STATUS, C
goto MulSkip ; Nope, Wait for the Next Bit
movf Mulhi, w ; Do 16 Bit Add to the Product
addwf Prodhi, f
btfsc STATUS, C ; If Carry Set, then Show TooCold Error
goto TooCold
movf Mul, w
addwf Prod, f
btfss STATUS, C ; Have to Carry to High Byte?
goto MulSkip
movlw 1 ; Yes, Are we too Cold?
addwf Prodhi, f
btfsc STATUS, C
goto TooCold
MulSkip ; Now, Just Rotate Everything Over for
bcf STATUS, C ; The Next Bit
rlf Mul, f
rlf Mulhi, f
decfsz Count, f ; Have we looped 8 times?
goto MulLoop
movlw 25 ; Value Must be >= 25
subwf Prodhi, f
btfsc STATUS, C ; "C" is the "Positive Flag"
goto GetReal ; Positive Flag is Set, Value is Okay
TooHot ; Too Hot, Outside the Range
movlw 15 ; Temperature is too high - Error
movwf Seg0
movwf Seg1
movwf Seg2
goto Display
attached is the whole ASM code