ist aber nicht sooo schön:
Code:
$regfile = "m8def.dat"
$crystal = 1000000
Config Portd = Output
Config Portc = Output
Dim Zahl As String * 1
Dim Eingabe As String * 255
Dim Ausgabe As String * 6
Dim X As Byte
Dim Waittime As Byte
Dim Scroller As Byte
Dim Timervar As Word
Dim Len6 As Byte
Eingabe = " dies ist ein eingabestring "
Len6 = Len(eingabe) - 6
Scroller = 1
Ausgabe = Mid(eingabe , Scroller , 5)
Timervar = 0
Waittime = 2
Cycle:
Incr Timervar
If Timervar > 6 Then Gosub Timeroverflow
Let X = 5 'Len(eingabe)
Portc = &B11111110 'Stelle 1
Gosub Zahlenauswahl
Waitms Waittime
Gosub Clear
Decr X
Portc = &B11111101 'Stelle 2
Gosub Zahlenauswahl
Waitms Waittime
Gosub Clear
Decr X
Portc = &B11111011 'Stelle 3
Gosub Zahlenauswahl
Waitms Waittime
Gosub Clear
Decr X
Portc = &B11110111 'Stelle 4
Gosub Zahlenauswahl
Waitms Waittime
Gosub Clear
Decr X
Portc = &B11101111 'Stelle 5
Gosub Zahlenauswahl
Waitms Waittime
Gosub Clear
Decr X
Portc = &B11011111 'Stelle 6
Gosub Zahlenauswahl
Waitms Waittime
Gosub Clear
Goto Cycle
Clear:
Portd = 255
Waitms 1
Return
Timeroverflow:
Timervar = 0
Incr Scroller
Ausgabe = Mid(eingabe , Scroller , 5)
If Scroller > Len6 Then Scroller = 1
Return
Zahlenauswahl:
Zahl = Mid(ausgabe , X , 1)
Select Case Zahl
Case " " : Portd = &B11111111
Case "0" : Portd = &B00101000
Case "1" : Portd = &B11101110
Case "2" : Portd = &B00110010
Case "3" : Portd = &B10100010
Case "4" : Portd = &B11100100
Case "5" : Portd = &B10100001
Case "6" : Portd = &B00100001
Case "7" : Portd = &B11101010
Case "8" : Portd = &B00100000
Case "9" : Portd = &B10100000
Case "A" : Portd = &B01100000
Case "a" : Portd = &B01100000
Case "B" : Portd = &B00100101
Case "b" : Portd = &B00100101
Case "C" : Portd = &B00111001
Case "c" : Portd = &B00110111
Case "D" : Portd = &B00100110
Case "d" : Portd = &B00100110
Case "E" : Portd = &B00110001
Case "e" : Portd = &B00110000
Case "F" : Portd = &B01110001
Case "f" : Portd = &B01110001
Case "G" : Portd = &B10100000
Case "g" : Portd = &B10100000
Case "H" : Portd = &B01100100
Case "h" : Portd = &B01100101
Case "I" : Portd = &B11101110
Case "i" : Portd = &B11101110
Case "J" : Portd = &B00101010
Case "j" : Portd = &B00101110
Case "L" : Portd = &B00111101
Case "l" : Portd = &B00111101
Case "N" : Portd = &B01100111
Case "n" : Portd = &B01100111
Case "O" : Portd = &B00100111
Case "o" : Portd = &B00100111
Case "P" : Portd = &B01110000
Case "p" : Portd = &B01110000
Case "Q" : Portd = &B11100000
Case "q" : Portd = &B11100000
Case "R" : Portd = &B01110111
Case "r" : Portd = &B01110111
Case "S" : Portd = &B10100001
Case "s" : Portd = &B10100001
Case "T" : Portd = &B00110101
Case "t" : Portd = &B00110101
Case "U" : Portd = &B00101100
Case "u" : Portd = &B00101111
Case "Y" : Portd = &B10100100
Case "y" : Portd = &B10100100
Case "Z" : Portd = &B00110010
Case "z" : Portd = &B00110010
Case Else : Portd = &B11011111
End Select
Return
Lesezeichen