Hi nochma^^
Ich hab jetzt einen anderen Thread gefunden, in dem das thema schon behandelt wurde. Sorry oO

gruss Serge

//Edit
Ok, ich hab jetzt mal ein programm mit tastern und Lauflichtern geschrieben, nach der anleintung von RN-Control Test von Frank. nun, eigentlich hab ich glaub alles richtig gesagt, nur beim Compillieren, motzt er:
Error:124 Line:0 ; Loop expected, in File:
-.-

nun, er braucht also noch ein Loop aber wo?

hier noch mein code:
Code:
Declare Sub Lauflicht1()
Declare Sub Lauflicht2()
Declare Sub Lauflicht3()
Declare Sub Lauflicht4()
Declare Function Tastenabfrage() As Byte
Dim Taste As Byte

$regfile = "m32def.dat"

$crystal = 16000000
$baud = 9600

 Config Adc = Single , Prescaler = Auto

 Config Pina.7 = Input                                      'Für Tastenabfrage
 Porta.7 = 1

 Taste = Tastenabfrage()
 If Taste <> 0 Then

      Select Case Taste
         Case 1
               Call Lauflicht1

         Case 2
               Call Lauflicht2

         Case 3
               Call Lauflicht3

         Case 3
               Call Lauflicht4



      End Select


 End If



 End

 Function Tastenabfrage() As Byte
 Local Ws As Word

 Tastenabfrage = 0
 Start Adc
 Ws = Getadc(7)
 If Ws < 1010 Then
      Select Case Ws
         Case 410 To 450
            Tastenabfrage = 1

         Case 340 To 380
            Tastenabfrage = 2

         Case 265 To 305
            Tastenabfrage = 3

         Case 180 To 220
            Tastenabfrage = 4


      End Select

   End If

 End Function

Sub Lauflicht1()

    Config Portc = Output
   Do
      Porta.0 = 1
      Wait 1
      Porta.0 = 0
      Wait 1
      Porta.0 = 1
      Wait 1
      Porta.0 = 0
      Wait 1

   End Sub


Sub Lauflicht2()

   Config Portc = Output
       Do
      Portc.0 = 1
      Wait 1
      Portc.1 = 1
      Wait 1
      Portc.2 = 1
      Wait 1
      Portc.3 = 1
       Portc.0 = 1
      Wait 1
      Portc.1 = 1
      Wait 1
      Portc.2 = 1
      Wait 1
      Portc.3 = 1

End Sub

Sub Lauflicht3()

   Config Portc = Output
      Portc.0 = 1
      Wait 1
      Portc.0 = 0
      Wait 1
      Portc.1 = 1
      Wait 1
      Portc.1 = 0
      Wait 1
      Portc.2 = 1
      Wait 1
      Portc.2 = 0
      Wait 1
      Portc.3 = 1
      Wait 1
      Portc.3 = 0

   End Sub

Sub Lauflicht4()

   Config Portc = Output
      Portc.0 = 1
      Wait 1
      Portc.0 = 0
      Portc.1 = 1
      Wait 1
      Portc.1 = 0
      Portc.2 = 1
      Wait 1
      Portc.2 = 0
      Portc.3 = 1
      Wait 1
      Portc.3 = 0
      Portc.4 = 1
      Wait 1
      Portc.4 = 0

End Sub
noch ne kurze frage: wird das Programm bei einem Compilierfehler nicht übertragen?

mfg Serge