Commit 2344961e authored by Jan Wagemakers's avatar Jan Wagemakers

offset correction

parent a8f93c97
......@@ -16,6 +16,18 @@
CONFIG LVP = OFF ; Low Voltage ICSP
CONFIG DEBUG = OFF ; Background Debugger Enable
; ---------------------------------------------------------------------------
; Constants
; ---------------------------------------------------------------------------
#DEFINE OFFSET D'24' ; Temperature correction,
; The DS1820 is accurate, but
; when build into a case,
; the temperature measured can be a
; litle higher then outside the
; case.
;
; 24/16 = 1.5°C
; ---------------------------------------------------------------------------
; Define LCD pins
; ---------------------------------------------------------------------------
......@@ -915,9 +927,14 @@ RETRY
; MEM = LTEMP ;
; BTW, we assume that we never meassure negative temperatures ;
;==============================================================;
movff IOBYTE, H_IST
movff IOBYTE, H_IST
movff MEM, L_IST
movlw OFFSET ; Load temp correction constant
subwf L_IST ; subtract correction
btfss STATUS, C ; If the Carry Flag is Set
decf H_IST ; dec H__IST
return
; ---------------------------------------------------------------------------
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment