N och nen Problem:
Wenn ich den schalter beim Startengedrückt halte Laufen die Leds durch...wenn ich ihn jedoch loslasse bleiben die Led's dauerhaft an, auch wenn ich ihn wieder drücke...Code:$regfile = "m32def.dat" $framesize = 32 $swstack = 32 $hwstack = 32 $crystal = 16000000 Config Portd.7 = Output Config Portc.1 = Output Config Portc.0 = Output Config Pina.7 = Input Taster Alias Pina.7 Rot Alias Portd.7 Gelb Alias Portc.1 Gruen Alias Portc.0 Porta.7 = 1 Rot = 1 Gelb = 1 Gruen = 1 Programmstart: If Pina.7 = 0 Then Goto Led_lauf Else Goto Blinken End If Blinken: Rot = 0 Gelb = 0 Gruen = 0 Wait 50 Rot = 1 Gelb = 1 Gruen = 1 Goto Programmstart Led_lauf: Rot = 0 Waitms 50 Rot = 1 Waitms 50 Gelb = 0 Waitms 50 Gelb = 1 Waitms 50 Gruen = 0 Waitms 50 Gruen = 1 Waitms 50 Gelb = 0 Waitms 50 Gelb = 1 Waitms 50 Goto Programmstart End







Zitieren

Lesezeichen