mollyman
21.06.2009, 07:23
Hi
ich habe ein kleines Problem mit meinem Programm:
Ich möchte durch ein High auf PINa.1 den Timer starten und durch ein High auf PINa.2 den Timer stoppen. Der Timerwert muss mit einem Wert Multipliziert werden. Dieser wert soll dann an eine 3 Stellige 7 Segment anzeige ausgegeben werden ohne Kommastellen. Die anzeige soll max 5 Sek den Wert anzeigen. Nach stopp des timers sollen die eingänge für 1 sekunde keine Änderungen annehmen.
Ich komme damit nicht wirklich klar vielleicht kann mir ja jemand helfen
dieses ist mein bisheriger Code
$regfile "m8def.dat"
$crystal = 1000000
Dim Test As Integer
Dim Zeit As Integer
Config Timer0 = Timer , Prescale = 1024
Stop Timer0
Timer0 = 0
Config Porta.1 = Input
Config Porta.2 = Input
Config Portb = Output
Config Portc = Output
Config Portd = Output
If Port_a.1 = 1 Then Start Timer0
If Port_a.2 = 1 Then Stop Timer0
End If
Read Tcnt0 = Zeit
Zeit / 1757 , 8125 = Test
If Test = 1 Then Portd = &B00000000 Portc = &B00000000 Portb = &B00110000
If Test = 2 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 0 1 1 0 1
If Test = 3 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 1 1 0 0 1
If Test = 4 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 0 1 1 0 0 1 1
If Test = 5 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 0 1 1 0 1 1
If Test = 6 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 0 1 1 1 1 1
If Test = 7 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 1 0 0 0 0
If Test = 8 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 1 1 1 1 1
If Test = 9 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 1 1 0 1 1
If Test = 10 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 1 1 1 0
If Test = 11 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 0 1 1 0 0 0 0
If Test = 12 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 0 1 1 0 1
If Test = 13 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 1 0 0 1
If Test = 14 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 0 1 1 0 0 1 1
If Test = 15 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 0 1 1 0 1 1
If Test = 16 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 0 1 1 1 1 1
If Test = 17 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 0 0 0 0
If Test = 18 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 1 1 1 1
If Test = 19 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 1 0 1 1
If Test = 20 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 21 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 22 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 23 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 24 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 25 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 26 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 27 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 28 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 29 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 1 0 1 1
If Test = 30 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 31 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 32 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 33 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 34 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 35 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 36 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 37 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 38 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 39 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 1 0 1 1
If Test = 40 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 41 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 42 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 43 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 44 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 45 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 46 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 47 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 48 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 49 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 1 0 1 1
If Test = 50 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 51 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 52 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 53 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 54 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 55 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 56 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 57 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 58 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 59 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 1 1 1 1 0 1 1
If Test = 60 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 61 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 62 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 63 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 64 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 65 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 66 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 67 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 68 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 69 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 1 1 1 1 0 1 1
If Test = 70 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 1 1 1 1 1 1 0
If Test = 71 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 0 1 1 0 0 0 0
If Test = 72 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 1 1 0 1 1 0 1
If Test = 73 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 1 1 1 1 0 0 1
If Test = 74 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 0 1 1 0 0 1 1
If Test = 75 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 1 0 1 1 0 1 1
If Test = 76 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 1 0 1 1 1 1 1
If Test = 77 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 1 1 1 0 0 0 0
If Test = 78 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 1 1 1 1 1 1 1
If Test = 79 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 1 1 1 1 0 1 1
If Test = 80 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 81 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 82 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 83 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 84 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 85 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 86 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 87 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 88 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 89 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 1 1 1 1 0 1 1
If Test = 90 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 91 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 92 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 93 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 94 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 95 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 96 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 97 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 98 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 99 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 1 1 1 1 0 1 1
If Test = 100 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 1 1 0 Portb = &B0 1 1 1 1 1 1 0
If Test = 101 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 0 1 1 0 0 0 0
If Test = 102 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 0 1 1 0 1
If Test = 103 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 1 1 0 0 1
If Test = 104 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 0 1 1 0 0 1 1
If Test = 105 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 0 1 1 0 1 1
If Test = 106 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 0 1 1 1 1 1
If Test = 107 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 1 0 0 0 0
If Test = 108 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 1 1 1 1 1
If Test = 109 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 1 1 0 1 1
If Test = 110 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 1 1 1 0
If Test = 111 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 0 1 1 0 0 0 0
If Test = 112 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 0 1 1 0 1
If Test = 113 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 1 0 0 1
If Test = 114 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 0 1 1 0 0 1 1
If Test = 115 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 0 1 1 0 1 1
If Test = 116 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 0 1 1 1 1 1
If Test = 117 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 0 0 0 0
If Test = 118 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 1 1 1 1
If Test = 119 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 1 0 1 1
If Test = 120 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 121 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 122 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 123 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 124 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 125 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 126 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 127 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 128 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 129 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 1 0 1 1
If Test = 130 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 131 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 132 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 133 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 134 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 135 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 136 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 137 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 138 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 139 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 1 0 1 1
If Test = 140 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 141 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 142 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 143 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 144 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 145 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 146 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 147 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 148 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 149 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 1 0 1 1
If Test > 150 Then Then Portd = &B01111010 Portc = &BB01111010 Portb = &BB01111010
If Test < 0 Then Then Portd = &B01111110 Portc = &B01111110 Portb = &B01111110
Waitms 1000
Portd = &B00000000 Portc = &B00000000 Portb = &B00000000
End If
End
Die Leerzeichen in der Matrix entfallen natürlich noch
ich habe ein kleines Problem mit meinem Programm:
Ich möchte durch ein High auf PINa.1 den Timer starten und durch ein High auf PINa.2 den Timer stoppen. Der Timerwert muss mit einem Wert Multipliziert werden. Dieser wert soll dann an eine 3 Stellige 7 Segment anzeige ausgegeben werden ohne Kommastellen. Die anzeige soll max 5 Sek den Wert anzeigen. Nach stopp des timers sollen die eingänge für 1 sekunde keine Änderungen annehmen.
Ich komme damit nicht wirklich klar vielleicht kann mir ja jemand helfen
dieses ist mein bisheriger Code
$regfile "m8def.dat"
$crystal = 1000000
Dim Test As Integer
Dim Zeit As Integer
Config Timer0 = Timer , Prescale = 1024
Stop Timer0
Timer0 = 0
Config Porta.1 = Input
Config Porta.2 = Input
Config Portb = Output
Config Portc = Output
Config Portd = Output
If Port_a.1 = 1 Then Start Timer0
If Port_a.2 = 1 Then Stop Timer0
End If
Read Tcnt0 = Zeit
Zeit / 1757 , 8125 = Test
If Test = 1 Then Portd = &B00000000 Portc = &B00000000 Portb = &B00110000
If Test = 2 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 0 1 1 0 1
If Test = 3 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 1 1 0 0 1
If Test = 4 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 0 1 1 0 0 1 1
If Test = 5 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 0 1 1 0 1 1
If Test = 6 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 0 1 1 1 1 1
If Test = 7 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 1 0 0 0 0
If Test = 8 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 1 1 1 1 1
If Test = 9 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 1 1 0 1 1
If Test = 10 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 1 1 1 0
If Test = 11 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 0 1 1 0 0 0 0
If Test = 12 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 0 1 1 0 1
If Test = 13 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 1 0 0 1
If Test = 14 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 0 1 1 0 0 1 1
If Test = 15 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 0 1 1 0 1 1
If Test = 16 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 0 1 1 1 1 1
If Test = 17 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 0 0 0 0
If Test = 18 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 1 1 1 1
If Test = 19 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 1 0 1 1
If Test = 20 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 21 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 22 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 23 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 24 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 25 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 26 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 27 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 28 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 29 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 1 0 1 1
If Test = 30 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 31 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 32 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 33 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 34 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 35 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 36 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 37 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 38 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 39 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 1 0 1 1
If Test = 40 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 41 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 42 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 43 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 44 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 45 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 46 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 47 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 48 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 49 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 1 0 1 1
If Test = 50 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 51 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 52 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 53 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 54 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 55 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 56 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 57 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 58 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 59 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 0 1 1 Portb = &B0 1 1 1 1 0 1 1
If Test = 60 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 61 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 62 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 63 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 64 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 65 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 66 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 67 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 68 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 69 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 0 1 1 1 1 1 Portb = &B0 1 1 1 1 0 1 1
If Test = 70 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 1 1 1 1 1 1 0
If Test = 71 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 0 1 1 0 0 0 0
If Test = 72 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 1 1 0 1 1 0 1
If Test = 73 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 1 1 1 1 0 0 1
If Test = 74 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 0 1 1 0 0 1 1
If Test = 75 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 1 0 1 1 0 1 1
If Test = 76 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 1 0 1 1 1 1 1
If Test = 77 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 1 1 1 0 0 0 0
If Test = 78 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 1 1 1 1 1 1 1
If Test = 79 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 0 0 0 0 Portb = &B0 1 1 1 1 0 1 1
If Test = 80 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 81 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 82 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 83 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 84 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 85 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 86 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 87 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 88 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 89 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 1 1 1 Portb = &B0 1 1 1 1 0 1 1
If Test = 90 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 91 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 92 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 93 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 94 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 95 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 96 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 97 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 98 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 99 Then Portd = &B0 0 0 0 0 0 0 0 Portc = &B0 1 1 1 1 0 1 1 Portb = &B0 1 1 1 1 0 1 1
If Test = 100 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 1 1 0 Portb = &B0 1 1 1 1 1 1 0
If Test = 101 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 0 1 1 0 0 0 0
If Test = 102 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 0 1 1 0 1
If Test = 103 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 1 1 0 0 1
If Test = 104 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 0 1 1 0 0 1 1
If Test = 105 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 0 1 1 0 1 1
If Test = 106 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 0 1 1 1 1 1
If Test = 107 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 1 0 0 0 0
If Test = 108 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 1 1 1 1 1
If Test = 109 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 0 0 0 0 0 0 Portb = &B0 1 1 1 1 0 1 1
If Test = 110 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 1 1 1 0
If Test = 111 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 0 1 1 0 0 0 0
If Test = 112 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 0 1 1 0 1
If Test = 113 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 1 0 0 1
If Test = 114 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 0 1 1 0 0 1 1
If Test = 115 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 0 1 1 0 1 1
If Test = 116 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 0 1 1 1 1 1
If Test = 117 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 0 0 0 0
If Test = 118 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 1 1 1 1
If Test = 119 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 0 0 Portb = &B0 1 1 1 1 0 1 1
If Test = 120 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 121 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 122 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 123 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 124 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 125 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 126 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 127 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 128 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 129 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 0 1 1 0 1 Portb = &B0 1 1 1 1 0 1 1
If Test = 130 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 131 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 132 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 133 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 134 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 135 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 136 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 137 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 138 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 139 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 1 1 1 1 0 0 1 Portb = &B0 1 1 1 1 0 1 1
If Test = 140 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 1 1 1 0
If Test = 141 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 0 1 1 0 0 0 0
If Test = 142 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 0 1 1 0 1
If Test = 143 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 1 0 0 1
If Test = 144 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 0 1 1 0 0 1 1
If Test = 145 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 0 1 1 0 1 1
If Test = 146 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 0 1 1 1 1 1
If Test = 147 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 0 0 0 0
If Test = 148 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 1 1 1 1
If Test = 149 Then Portd = &B0 0 1 1 0 0 0 0 Portc = &B0 0 1 1 0 0 1 1 Portb = &B0 1 1 1 1 0 1 1
If Test > 150 Then Then Portd = &B01111010 Portc = &BB01111010 Portb = &BB01111010
If Test < 0 Then Then Portd = &B01111110 Portc = &B01111110 Portb = &B01111110
Waitms 1000
Portd = &B00000000 Portc = &B00000000 Portb = &B00000000
End If
End
Die Leerzeichen in der Matrix entfallen natürlich noch