Zitat Zitat von Thomas$
wozu hast du die variable Angeschaltet
weil ich noch ein blutiger anfänger bin^^

sag mir mal bitte was eine variable ist ich habe keine ahnung.

also das programm tut genau das selbe wie das oben

Code:
 $regfile = "m8def.dat"
 $framesize = 60
 $swstack = 60
 $hwstack = 60
 $crystal = 8000000

 $baud = 9600

 Config Portb.0 = Output
 Led Alias Portb.0
 Config Pind.7 = Input
 Taster Alias Pind.7
 Portd.7 = 1
 Config Portc.5 = Output
 Led1 Alias Portc.5
 Config Portc.4 = Output
 Led2 Alias Portc.4
 Config Portc.3 = Output
 Led7 Alias Portc.3
 Config Portc.2 = Output
 Led3 Alias Portc.2
 Config Portc.1 = Output
 Led4 Alias Portc.1
 Config Portc.0 = Output
 Led6 Alias Portc.0
 Config Portb.1 = Output
 Led5 Alias Portb.1

  Dim Angeschaltet As Bit

  Do

   If Taster = 0 And Angeschaltet = 0 Then
    Led1 = 1
    Led2 = 1
    Led3 = 1
    Led4 = 1
    Led5 = 1
    Led6 = 1
    Led7 = 0
    Angeschaltet = 1
   Waitms 500
    Led1 = 0
    Led2 = 0
    Led3 = 0
    Led4 = 0
    Led5 = 1
    Led6 = 1
    Led7 = 0
    Angeschaltet = 0
   Waitms 500
    Led1 = 1
    Led2 = 0
    Led3 = 1
    Led4 = 1
    Led5 = 0
    Led6 = 1
    Led7 = 1
    Angeschaltet = 1
   Waitms 500
    Led1 = 1
    Led2 = 0
    Led3 = 0
    Led4 = 1
    Led5 = 1
    Led6 = 1
    Led7 = 1
    Angeschaltet = 0
   Waitms 500
   Elseif Taster = 1 And Angeschaltet = 1 Then
    Led1 = 0
    Led2 = 0
    Led3 = 0
    Led4 = 0
    Led5 = 0
    Led6 = 0
    Led7 = 0
    Angeschaltet = 1
   Waitms 500
    End If
   Loop


   End