ich hab das mal so geschrieben
kommt das der sache näher?
ich hab das Buch von Claus Kühnel da stand das so ungefähr drinne allerdings mit einer 7 segmentanzeige. aber das prinzip ist ja das selbe.
es haut noch nich ganz hin, im Buch is ja die anzeige an einem port und da staht dann Portb = X(i) , das kann ich ja nicht schreiben weil ich ja mehere ports habe *bruml*
das mit der Tabelle klappt dadurch noch nicht ganz
mfg
Code:$regfile "attiny2313.dat" $crystal = 1000000 $hwstack = 32 ' default use 32 for the hardware stack $swstack = 10 ' default use 10 for the SW stack $framesize = 40 Config Portd = Output Config Portb = Output Config Porta = Output Porta.0 = A.0 'Linksoben Portd.6 = A.1 'Linksmitte Portd.2 = A.2 'Linksunten Portb.1 = A.3 'Mitteoben Portd.3 = A.4 'Mittemitte Portb.0 = A.5 'Mitteunten Portd.4 = A.6 'Rechtsoben Portb.2 = A.7 'Rechtsmitte Portd.5 = A.8 'Rechtsunten Portd.1 = A.9 'Ebene1 Porta.1 = A.10 'Ebene2 Portd.0 = A.11 'Ebene3 Dim B As Word Dim A As Word Dim X(4) As Word Restore Data1 For B = 1 To 4 Read X(i) Next Do For B = 1 To 4 A = X(i) Waitms 500 Next Loop Data1: Data &B00000000111 , &B10000000011 , &B01000000011 , &B00100000011







Zitieren

Lesezeichen