hi , bin selber neu in Bascom , ich versuch nur zu helfen , hab dein code geändert mit pinc.0 kannst raufzählen , mit pinc.1 runterzählen , ich hoffe dich geholfen zu haben , ist mein erster versuch
Schöne grüsse aus Österreich
Code:$regfile = "m8def.dat" $crystal = 1000000 ' 1MHZ crystal Config Pind.0 = Output Config Pind.1 = Output Config Pind.7 = Output Config Pind.3 = Output Config Pind.4 = Output Config Pind.5 = Output Config Pind.6 = Output Config Pinc.0 = Input Config Pinc.1 = Input Portc.0 = 1 Portc.1 = 1 Dim I As Byte I = 0 Do If Pinc.0 = 1 Then Incr I End If If Pinc.1 = 1 Then Decr I End If If I >= 9 Then I = 0 End If Portd = 0 Select Case I Case 0 : Gosub Null Case 1 : Gosub Eins Case 2 : Gosub Zwei Case 3 : Gosub Drei Case 4 : Gosub Vier Case 5 : Gosub Fuenf Case 6 : Gosub Sechs Case 7 : Gosub Sieben Case 8 : Gosub Acht Case 9 : Gosub Neun End Select Waitms 500 Loop Return Null: Portd.0 = 1 Portd.1 = 1 Portd.7 = 1 Portd.3 = 1 Portd.4 = 1 Portd.5 = 1 Portd.6 = 0 Wait 9 Return Eins: Portd.1 = 1 Portd.7 = 1 Portd.3 = 0 Portd.4 = 0 Portd.5 = 0 Portd.6 = 0 Portd.0 = 0 Wait 9 Return Zwei: Portd.0 = 1 Portd.1 = 1 Portd.6 = 1 Portd.4 = 1 Portd.3 = 1 Portd.5 = 0 Portd.7 = 0 Wait 9 Return Drei: Portd.0 = 1 Portd.1 = 1 Portd.6 = 1 Portd.7 = 1 Portd.3 = 1 Portd.5 = 0 Portd.4 = 0 Wait 9 Return Vier: Portd.5 = 1 Portd.6 = 1 Portd.1 = 1 Portd.7 = 1 Portd.4 = 0 Portd.3 = 0 Portd.0 = 0 Wait 9 Return Fuenf: Portd.0 = 1 Portd.5 = 1 Portd.6 = 1 Portd.7 = 1 Portd.3 = 1 Portd.4 = 0 Portd.1 = 1 Wait 9 Return Sechs: Portd.0 = 1 Portd.5 = 1 Portd.6 = 1 Portd.4 = 1 Portd.3 = 1 Portd.7 = 1 Portd.1 = 0 Wait 9 Return Sieben: Portd.0 = 1 Portd.1 = 1 Portd.7 = 1 Portd.3 = 0 Portd.4 = 0 Portd.5 = 0 Portd.6 = 0 Wait 9 Return Acht: Portd.0 = 1 Portd.1 = 1 Portd.7 = 1 Portd.3 = 1 Portd.4 = 1 Portd.5 = 1 Portd.6 = 1 Wait 9 Return Neun: Portd.0 = 1 Portd.1 = 1 Portd.7 = 1 Portd.3 = 1 Portd.5 = 1 Portd.6 = 1 Portd.4 = 0 Wait 9 Return







Zitieren

Lesezeichen