x-ryder
28.02.2005, 15:52
Hi Leutz,
ich hab hier nen DS18B20 rumliegen und wollte mal fragen ob mir jemand mal sagen kann was hierdran falsch ist und wie es richtig heißt?
$regfile = "m8def.dat"
$crystal = 7372800
Config 1wire = Portc.0
Config Lcd = 20 * 4 '20 x 4 (Spalten x Zeilen)
Config Lcdpin = Pin , E = Portb.0 , Rs = Portb.1 , Db7 = Portb.5 , Db6 = Portb.4 , Db5 = Portb.3 , Db4 = Portb.2 'Belegung am MEGA8
Config Lcdbus = 4 '4-Bit Bus
Config Lcdmode = Port '4-Bit Bus
Config Portb = Output 'Portb in Ausgabe Modus (Display)
Cls
Dim Temp(2) As Byte
Dim Ident(8) As Byte
Dim I As Byte
1wreset
Do
1wwrite &H33
For I = 1 To 8
Ident(i) = 1wread(8)
Next
Locate 1 , 1
For I = 1 To 4
Lcd Ident(i) ; " "
Next
Locate 2 , 1
For I = 5 To 8
Lcd Ident(i) ; " "
Next
Waitms 50
Cls
Loop
End
Martin
ich hab hier nen DS18B20 rumliegen und wollte mal fragen ob mir jemand mal sagen kann was hierdran falsch ist und wie es richtig heißt?
$regfile = "m8def.dat"
$crystal = 7372800
Config 1wire = Portc.0
Config Lcd = 20 * 4 '20 x 4 (Spalten x Zeilen)
Config Lcdpin = Pin , E = Portb.0 , Rs = Portb.1 , Db7 = Portb.5 , Db6 = Portb.4 , Db5 = Portb.3 , Db4 = Portb.2 'Belegung am MEGA8
Config Lcdbus = 4 '4-Bit Bus
Config Lcdmode = Port '4-Bit Bus
Config Portb = Output 'Portb in Ausgabe Modus (Display)
Cls
Dim Temp(2) As Byte
Dim Ident(8) As Byte
Dim I As Byte
1wreset
Do
1wwrite &H33
For I = 1 To 8
Ident(i) = 1wread(8)
Next
Locate 1 , 1
For I = 1 To 4
Lcd Ident(i) ; " "
Next
Locate 2 , 1
For I = 5 To 8
Lcd Ident(i) ; " "
Next
Waitms 50
Cls
Loop
End
Martin