Und hier ist das SEnderProgramm:
Portd2 und 3 simulieren zwei Abstandssensoren, die später folgen sollen

$regfile = "m8def.dat"
$crystal = 3686400

'-------------------------------------------------------------------------------
'BEWEGUNGS-BUS
Config Portc.0 = Input 'weitersignal

Config Portc.1 = Output 'Bewegungsrichtung
Config Portc.2 = Output
Config Portc.3 = Output
Config Portc.4 = Output

Config Portc.5 = Output 'signal start

Config Portd.2 = Input 'sensor rechts
Config Portd.3 = Input 'sensor links

Declare Sub Grund '0000
Declare Sub Vor '0001
Declare Sub Rueck '0010
Declare Sub Rdreh '0011
Declare Sub Ldreh '0100

'------------------------------------------------
Portc.5 = 1
Bitwait Pinc.0 , Set
Waitms 200
Portc.5 = 0

Do
If Pind.2 = 1 And Pind.3 = 1 Then
Call Rueck
End If
If Pind.2 = 1 And Pind.3 = 0 Then
Call Ldreh
End If
If Pind.2 = 0 And Pind.3 = 1 Then
Call Rdreh
End If
If Pind.2 = 0 And Pind.3 = 0 Then
Call Vor
End If


Waitms 200
Bitwait Pinc.0 , Set
Loop
End
'================================================= ==============================
Sub Grund

Portc.1 = 0
Portc.2 = 0
Portc.3 = 0
Portc.4 = 0
Portc.5 = 1
Wait 1
Portc.1 = 0
Portc.2 = 0
Portc.3 = 0
Portc.4 = 0
Portc.5 = 0
End Sub
'-------------------------------------------------------------------------------
Sub Vor

Portc.1 = 0
Portc.2 = 0
Portc.3 = 0
Portc.4 = 1
Portc.5 = 1
Wait 1
Portc.1 = 0
Portc.2 = 0
Portc.3 = 0
Portc.4 = 0
Portc.5 = 0

End Sub
'-------------------------------------------------------------------------------
Sub Rueck

Portc.1 = 0
Portc.2 = 0
Portc.3 = 1
Portc.4 = 0
Portc.5 = 1
Wait 1
Portc.1 = 0
Portc.2 = 0
Portc.3 = 0
Portc.4 = 0
Portc.5 = 0

End Sub
'-------------------------------------------------------------------------------
Sub Rdreh

Portc.1 = 0
Portc.2 = 0
Portc.3 = 1
Portc.4 = 1
Portc.5 = 1
Wait 1
Portc.1 = 0
Portc.2 = 0
Portc.3 = 0
Portc.4 = 0
Portc.5 = 0

End Sub
'-------------------------------------------------------------------------------
Sub Ldreh

Portc.1 = 0
Portc.2 = 1
Portc.3 = 0
Portc.4 = 0
Portc.5 = 1
Wait 1
Portc.1 = 0
Portc.2 = 0
Portc.3 = 0
Portc.4 = 0
Portc.5 = 0

End Sub
'-------------------------------------------------------------------------------

Mein Problem ist, dass die beiden Programme nicht mirt einander arbeiten (es kommt nicht über die start sequenz hinaus)

könnte es an dem Befehl bitwait liegen, dad ich ihn zum ersten mal verwende und aus dem Handbuch diese Funktion entnommen habe?
schon jetzt danke für eure hilfe
mfg robin