; Parameters: ADC reading in W
; Returns: Nothing
DisplayTemp
clrf PCLATH ;Conversion table is in 1st page
;.....ROUTINE TO CHECK VALUE
CHECK
movwf Temp3
andlw b'11111000'
xorlw b'11111000'
btfss STATUS,Z
goto RESTORE
goto CORRECT_VALUE
;.......IF VALUE EXCEEDS 0XF8, MAKE IT 0XF8
CORRECT_VALUE
movlw 0XF8
goto VERIFIED
;........OTHERWISE RESTORE ORIGINAL VALUE
RESTORE
movf Temp3,W
goto VERIFIED
;...........................
VERIFIED call CTable ;Goto jump table for Celsius Temperature
movwf L_Byte ;Load binary data for BCD conversion