Gast
#510958
Hallo, ich habe folgendes Programm auf einem M8 laufen. Es soll 6 Zahlen von 1-6 auf einem Display ausgeben. Das Display besteht aus 6 mal 7-Segm.Anzeigen, die über Schieberegister gesteuert werden. Mein Problem ist, das auf dem Display nichts erscheint. Wenn ich das Unterprogramm _schiftout in die schleife setze, so erscheinen wenigstens die Zahlen von 1 bis 5. Woran könnte das liegen ?????? $regfile "m8def.dat" $crystal = 8000000 Config Portd = Output Dim Z(6) As Word Dim X As Byte , Wert As Single , Y As Byte , Wert_string As String * 6 Dim Zahl(10) As Byte Dim H As String * 1 , C As Byte Z(1) = &B11111111 Z(2) = &B11111111 Z(3) = &B11111111 Z(4) = &B11111111 Z(5) = &B11111111 Z(6) = &B11111111 Gosub _shiftout Restore Zahlen For X = 0 To 9 Read Zahl(x) Next For X = 1 To 6 Z(x) = Zahl(x) Next Gosub _shiftout Do Loop _shiftout: Portd.2 = 1 Shiftout Portd.0 , Portd.1 , Z(1) , 2 , 8 , 10 Shiftout Portd.0 , Portd.1 , Z(2) , 2 , 8 , 10 Shiftout Portd.0 , Portd.1 , Z(3) , 2 , 8 , 10 Shiftout Portd.0 , Portd.1 , Z(4) , 2 , 8 , 10 Shiftout Portd.0 , Portd.1 , Z(5) , 2 , 8 , 10 Shiftout Portd.0 , Portd.1 , Z(6) , 2 , 8 , 10 Portd.2 = 0 Return Zahlen: Data &B00000011 , &B10011111 , &B00100101 , &B00001101 , &B10011001 Data &B01001001 , &B01000001 , &B00011111 , &B00000001 , &B00001001