Hallo
ich hab endlich die schaltung so weit fertig, das ich sie einsetzen könnte.
ein Port soll geoffnet werden, wenn ein bestimmtes RC5 Signal kommt.
Ich komm nur mit den Bedingungen nicht zu recht, bin eigentlich Pascaller, könnt ihr mir sagen, wie das richtig geht?
da ich im Code nichts makieren kann pack ich den hier nochmal so hin:Code:$regfile = "m8def.dat" $crystal = 4000000 $baud = 9600 $lib "mcsbyte.lbx" Config Pind.2 = Input Config Portb.1 = Output Portb.1 = 0 Portd.2 = 1 Config Rc5 = Pind.2 Enable Interrupts Dim Address As Byte , Command As Byte Print "Waiting for RC5..." Do Getrc5(address , Command) If Address <> 255 Then Command = Command And &B01111111 Print Address ; " " ; Command If Address = 30 And Command = 61 Then Portb.1 = 1 Waitms 100 Portb.1 = 0 End If End If Loop End
Getrc5(address , Command)
If Address <> 255 Then
Command = Command And &B01111111
Print Address ; " " ; Command
If Address = 30 And Command = 61
Then
Portb.1 = 1
Waitms 100
Portb.1 = 0
End If
End If
Die Probleme betreffen den Fetten Teil
Danke schonmal







Zitieren

Lesezeichen