Alles klar, ich hab jetzt an meinem Code noch n bissl rumgebastelt und alles erneut verkabelt (um Wackelkontakte auszuschließen) und siehe da, es funktioniert.
Hier ist mein Code.
Nur könnte mir jemand sagen was diese Zeile bewirkt?Code:$regfile = "m32def.dat" $framesize = 32 $swstack = 32 $hwstack = 32 $crystal = 16000000 $baud = 9600 Config Portc = Output Config Porta = Input Config Adc = Single , Prescaler = Auto Dim W As Long Start Adc Do W = Getadc(7) If W > 50 Then Portc.1 = 0 Else Portc.1 = 1 End If If W > 100 Then Portc.2 = 0 Else Portc.2 = 1 End If If W > 200 Then Portc.3 = 0 Else Portc.3 = 1 End If If W > 400 Then Portc.4 = 0 Else Portc.4 = 1 End If If W > 600 Then Portc.5 = 0 Else Portc.5 = 1 End If If W > 700 Then Portc.6 = 0 Else Portc.6 = 1 End If If W > 800 Then Portc.7 = 0 Else Portc.7 = 1 End If If W < 50 Then Portc.0 = 0 Else Portc.0 = 1 End If Loop End
Ich hatte sie Anfangs in meinem Code, weil ich irgentwo mitbekommen habe dass diese Zeile rein muss. Doch er funktioniert mit oder ohne genau gleich.Code:Tccr1b = Tccr1b Or &H02
Gruß








Zitieren

Lesezeichen