hier die relevanten Teile:
Code:
Do
Gosub Temperatur_ds1820
Locate 1 , 1
Lcd Time$ ; " " ; Date$ ;
Locate 2 , 1
Lcd "t=" ; Fusing(stemp , "#.#")
Loop
sectic:
nop
return
Temperatur_ds1820:
1wreset
1wwrite Skiprom
1wwrite Convertt
Do
Temp = 1wread()
Loop Until Temp = &HFF
1wreset
1wwrite Skiprom
1wwrite Read_ram
For I = 1 To 9
Scratch(i) = 1wread()
Next
Temp = Scratch(2)
Shift Temp , Left , 8
Temp = Temp + Scratch(1)
Temp1 = Temp
Temp1 = Temp1 / 2
Stemp = Scratch(8) - Scratch(7)
Stemp = Stemp / Scratch(8)
Stemp = Stemp + Temp1
Stemp = Stemp - 0.25
Return
egal wohin ich "Gosub Temperatur_ds1820" verschiebe(z.B. ins "sectic")
das Programm hängt sich auf,
Gruß, Rene
Lesezeichen