Hallo!

Dieses Programm von mir ändert den Zustand der Pins auch zur Laufzeit:
Code:
'Name:.............Reaktive LED
'Version:..........1.0a
'Datum:............25.12.2008
'Autor:............Thomas Edlinger
'---------------------------------
'Beschreibung: Bei Lichteinfall auf die LED schaltet sich die LED ein
'              PA6=Anode
'              PA7=Kathode



$regfile = "m32def.dat"
$crystal = 1000000


'KONFIGURATION PORTS
Config Porta.6 = Output
Config Porta.7 = Output

Dim A As Bit



Do

   Porta.6 = 0
   Porta.7 = 1
   Waitms 1

   Config Porta.7 = Input
   Porta.7 = 0
   Waitms 20

   A = Pina.7

   Config Porta.7 = Output
   Porta.7 = 0

   If A = 0 Then
      Porta.6 = 1
      Wait 1
      Porta.6 = 0
   End If



Loop

End
Das Programm funktioniert übrigens einwandfrei.

Gruß
Thomas