Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20588

BASCOM-AVR : Single problem : NEWTOPIC

$
0
0
Hello everyone, Below a code snippet. ***************************************** Dim Terr_set_s As String * 4 Dim Terr_set As Single Const Terr_min = 0.2 ' 0.2oC Const Terr_max = 1.5 ' 1.5oC Const Terr_def = 0.5 ' 0.5oC Const Rast_terr = 0.1 ' skok nastawy ' If Selection = 3 Then Terr_set = Terr_set - Rast_terr If Terr_set < Terr_min Then Terr_set = Terr_min : Gosub Piezo_long Terr_set = Terr_set + 0.01 End If Terr_set_ee = Terr_set Terr_set_s = Fusing(terr_set , "#.&&") Gosub Display_sett : Gosub Piezo : Waitms 200 : Reset Watchdog End If ' ***************************************** The problem is, that without the (Terr_set = Terr_set + 0.01) line, the minimum Terr_set_s value I see on the lcd is 0.19, not 0.20. ***************************************** Display_sett: Locate 2 , 9 Lcd "Te=" : Lcd Terr_set_s : Lcd Chr(5) Return ***************************************** Any ideas, what Am I doing wrong? kind regards Tomek [b][color=red](BASCOM-AVR version : 2.0.7.6 )[/b][/color]

Viewing all articles
Browse latest Browse all 20588

Trending Articles