Hallo Leute, ich Multiplexe zur Zeit meine 8 x 8 Matrix Testweise in der while(1) - MEGA32 / 16 MHz... Leider sehe ich auf meiner LED Matrix ständig "Geisterbilder" So sieht mein Code aus... Mache ich was falsch ? Später soll das ganze zwei ISR Interrupts übernehmen...
1 | PORTB = VRAM[0]; |
2 | PORTC |= (1<<PC7); |
3 | _delay_ms(2); |
4 | PORTC &= ~(1<<PC7); |
5 | PORTB = 0x00; |
6 | |
7 | PORTB = VRAM[1]; |
8 | PORTC |= (1<<PC6); |
9 | _delay_ms(2); |
10 | PORTC &= ~(1<<PC6); |
11 | PORTB = 0x00; |
12 | |
13 | PORTB = VRAM[2]; |
14 | PORTC |= (1<<PC5); |
15 | _delay_ms(2); |
16 | PORTC &= ~(1<<PC5); |
17 | PORTB = 0x00; |
18 | |
19 | PORTB = VRAM[3]; |
20 | PORTC |= (1<<PC4); |
21 | _delay_ms(2); |
22 | PORTC &= ~(1<<PC4); |
23 | PORTB = 0x00; |
24 | |
25 | PORTB = VRAM[4]; |
26 | PORTC |= (1<<PC3); |
27 | _delay_ms(2); |
28 | PORTC &= ~(1<<PC3); |
29 | PORTB = 0x00; |
30 | |
31 | PORTB = VRAM[5]; |
32 | PORTC |= (1<<PC2); |
33 | _delay_ms(2); |
34 | PORTC &= ~(1<<PC2); |
35 | PORTB = 0x00; |
36 | |
37 | |
38 | PORTB = VRAM[6]; |
39 | PORTC |= (1<<PC1); |
40 | _delay_ms(2); |
41 | PORTC &= ~(1<<PC1); |
42 | PORTB = 0x00; |
43 | |
44 | PORTB = VRAM[7]; |
45 | PORTC |= (1<<PC0); |
46 | _delay_ms(2); |
47 | PORTC &= ~(1<<PC0); |
48 | PORTB = 0x00; |