Gast
#2703456
Hallo ich habe ein kleines Problem beim Programmieren meiner Eieruhr.Und zwar weiß ich jetzt nicht wie ich es schaffe das ich erst den wert von w einstellen kann und dann erst eine wait funktion ausführen kann.Wie macht man sowas? Hier mal den Code den ich bis jetzt habe: $regfile "m8def.dat" $crystal = 8000000 Config Portc.1 = Output Config Portc.2 = Output Config Portc.3 = Output Config Portb.0 = Input Portb.0 = 1 Declare Sub Keypressed Dim W As Byte Do Debounce Pinb.0 , 0 , Keypressed , Sub Select Case W Case 1 : Portc.1 = 1 Case 2 : Portc.1 = 1 Portc.2 = 1 Case 3 : Portc.1 = 1 Portc.2 = 1 Portc.3 = 1 Case Else : Portc.1 = 0 Portc.2 = 0 Portc.3 = 0 End Select Loop Sub Keypressed Incr W If W > 3 Then W = 0 End If End Sub End