Es sollte besser klappen, wenn Du Dir den Status des PCs merkst.

Code:
$regfile = "2313def.dat"
$crystal = 1000000



Config Pinb.0 = Input
Config Portb.1 = Output
Config Portb.2 = Output

Acc Alias Pinb.0
Wechsel Alias Portb.1
Pcon Alias Portb.2
Dim Variablen1 As Byte

Pcanaus Alias Variablen1.0



Do


If Acc = 1 And Pcanaus = 0 Then
   Wait 1
   Set Wechsel
   Wait 2
   Set Pcon
   Wait 1
   Reset Pcon
   Pcanaus = 1

End If

If Acc = 0 And Pcanaus = 1 Then
   Wait 1
   Set Pcon
   Wait 1
   Reset Pcon
   Wait 20
   Reset Wechsel
   Pcanaus = 0
End If

nop

Loop

End