Config Portd.0 = Input
Portd.0 = 1
Config Pind.1 = Output

Do

If Portd.0 = 1 Then Pind.1 = 1 Else Pind.1 = 0
Wait 1
Loop

Schreib das mal so.....