Code:
$regfile = "m162def.dat"                                    ' specify the used micro
$crystal = 8000000                                          ' used crystal frequency
$baud = 19200
'baud rate for second serial port
$baud1 = 19200
                                            ' use baud rate
$hwstack = 42                                               ' default use 32 for the hardware stack
$swstack = 40                                               ' default use 10 for the SW stack
$framesize = 40                                             ' default use 40 for the frame space

Enable Interrupts


'PORTS DEKLARIEREN

Rs485dir Alias Portd.2
Config Rs485dir = Output
Rs485dir = 0

Rs485dir1 Alias Portb.1
Config Rs485dir1 = Output
Rs485dir1 = 0                                               ' go to receive mode

Error Alias Porta.7
Config Error = Output
Error = 0


Code1 Alias Pinc.0
Config Code1 = Input
Portc.0 = 1                                                 

Code2 Alias Pinc.1
Config Code2 = Input
Portc.1 = 1

Code3 Alias Pinc.2
Config Code3 = Input
Portc.2 = 1

'MAIN LOOP

Do

 If Code1 = 0 Then
 Error = 1

 Else

   Error = 0

   If Code2 = 0 Then
   Wait 5

   Error = 1

   Wait 5
    End If
 End If

Loop

End
So also das war jetzt mal das kleine Testprogram das ich geschrieben hab. Es soll nicht viel passieren, außer das wenn der eine Dipschalter an is die LED leuchten soll, bei dem anderen soll sie blinken und bei beiden soll sie aus sein.

In der Simulation funktioniert das auch, und bei anderen µC hat das auch funktioniert zum Testen. Oder hab ich was übersehen? Ich denke nach wie vor, dass es evtl. was mit der Hardware zu tun hat?