Ich würde es so machen:Was kann ich jetzt noch machen?
Annahme ist, dass immer nur eine LED an sein soll, nicht mehrere gleichzeitig.Code:$regfile = "m32def.dat" $framesize = 32 $swstack = 32 $hwstack = 32 $crystal = 1600000 $baud = 9600 Config Porta = Input Config Portb = Output Config Portc = Output Dim Col As Byte Dim Row As Byte Dim Time as Byte Porta=0 Portb=0 Portc=0 Time=1 Do For Row = 0 To 2 DDRA.Row = 1 For Col = 0 To 7 Portc.Col = 1 Waitms Time Portc.Col = 0 Next Col Portb.7 = 1 Waitms Time Portb.7 = 0 DDRA.Row=0 Next Row Loop
Die LEDs sind praktisch zwischen den PINs angeschlossen, d.h. 5V an Portc (und Portb.7), dann die LED, dann ein Vorwiderstand, dann in Porta.
An jedem Pin von Portc sind 3 LEDs angeschlossen, an jedem Vorwiderstand 9.
Gruß
Rolf






Zitieren

Lesezeichen