Code:
showonlcd:
select case display
Case 1
display = display + 1
gosub read_maintemp
INTCON.7 = 0
Serout2 thelcd,Baud, [I,clr]
Serout2 thelcd,Baud, [I,130,"MAIN TANK TEMP"]
Serout2 thelcd,Baud, [I,196,#(AD_Result/100),".",#(AD_Result//100),4," ","C"]
AD_Result = 0
INTCON.7 = 1
low buzzer
case 6
display = display + 1
gosub read_qttemp
INTCON.7 = 0
Serout2 thelcd,Baud, [I,clr]
Serout2 thelcd,Baud, [I,130,"Q/T TANK TEMP"]
Serout2 thelcd,Baud, [I,196,#(AD_Result/100),".",#(AD_Result//100),4," ","C"]
AD_Result = 0
INTCON.7 = 1
Case 11
display = display + 1
if trouble = 0 then
INTCON.7 = 0
Serout2 thelcd,Baud, [I,clr]
Serout2 thelcd,Baud, [I,132," SYSTEM"]
Serout2 thelcd,Baud, [I,196,"NORMAL"]
INTCON.7 = 1
looplength = 15
else
display = 16
looplength = 21
ENDIF
Case 16
display = display + 1
holding = trouble.0
if holding = 1 then
INTCON.7 = 0
Serout2 thelcd,Baud, [I,clr]
Serout2 thelcd,Baud, [I,130,"MAIN TANK TEMP"]
Serout2 thelcd,Baud, [I,197,"ALARM"]
INTCON.7 = 1
trouble.0 = 0
looplength = 22
else
display = 21
looplength = 26
ENDIF
Case 21
display = display + 1
holding = trouble.1
if holding = 1 then
INTCON.7 = 0
Serout2 thelcd,Baud, [I,clr]
Serout2 thelcd,Baud, [I,130,"Q/T TANK TEMP"]
Serout2 thelcd,Baud, [I,194,"ALARM"]
INTCON.7 = 1
trouble.1 = 0
looplength = 27
else
display = 26
looplength = 31
ENDIF
Case 26
display = display + 1
holding = trouble.2
if holding = 1 then
INTCON.7 = 0
Serout2 thelcd,Baud, [I,clr]
Serout2 thelcd,Baud, [I,130,"MAIN TANK "]
Serout2 thelcd,Baud, [I,194,"SKIMMER ALARM"]
INTCON.7 = 1
trouble.2 = 0
looplength = 32
else
display = 31
looplength = 36
ENDIF
Case 31
display = display + 1
holding = trouble.3
if holding = 1 then
INTCON.7 = 0
Serout2 thelcd,Baud, [I,clr]
Serout2 thelcd,Baud, [I,130,"MAIN TANK RETURN"]
Serout2 thelcd,Baud, [I,196,"PUMP ALARM"]
INTCON.7 = 1
trouble.3 = 0
looplength = 37
else
display = 36
looplength = 41
ENDIF
Case 36
display = display + 1
holding = trouble.4
if holding = 1 then
INTCON.7 = 0
Serout2 thelcd,Baud, [I,clr]
Serout2 thelcd,Baud, [I,130,"WATER LEAK"]
Serout2 thelcd,Baud, [I,196,"ALARM"]
INTCON.7 = 1
trouble.4 = 0
looplength = 42
else
display = 41
looplength = 46
ENDIF
end select
if display = looplength then
display = 0
looplength = 16
ENDIF
RETURN
goto mainloop
Thanks all for the continued support.
Bookmarks