MMhhh...
hab beides probiert.
Die "OR"-Funktion wird gar nicht als solche im Bascom erkannt? Gibt es da eine besondere Programmierweise? Diese Idee hatte ich auch schon aber ich konnte sie nicht umsetzten. Ich habs so probiert:
If Dip1 = 1
or
Dip2 = 1
or
Dip3 = 1
or
Dip4 = 1 Then
Led = 0
Else
Led = 1
End If
@ for_ro
Ist hier noch irgendwo ein Fehler versteckt......die Led reagiert hier gar nicht:
Code:
$regfile = "M8def.dat"
$crystal = 1000000
Dips Alias Portc
Dips = Portc And &B0000_1111 'du willst ja nur die unteren 4 Pins
Portc = 15
Config Portd = Output
Led Alias Portd.0
Do
If Dips > 0 Then
Led = 1
Else
Led = 0
End If
Loop
Lesezeichen