Hi,
Sorry I've been away for a while, but I'm back
I'm running 20 L.e.d's from a 20M2. the leds are plexed in 4 x 5 array. Leds 1 to 5 on output pins 3 to 7 and the 4 arrays switched on and off using C.0 to C.3
I've made one pattern, but I've nearly used half the memory. I was hoping to put a few diffident patterns in..
Is there a different way to do these type of patterns using less memory?
the massive code below simply makes the following pattern from all L.e.d's on to all off:
11111111111111111111 - step1
11111111100111111111 - step2
11111111000011111111 -step3
11111110000001111111 - & so on looping
11111100000000111111
11111000000000011111
11110000000000001111
11100000000000000111
11000000000000000011
10000000000000000001
00000000000000000000
11111111111111111111
code and diagram (hopefully added here)
Sorry I've been away for a while, but I'm back
I'm running 20 L.e.d's from a 20M2. the leds are plexed in 4 x 5 array. Leds 1 to 5 on output pins 3 to 7 and the 4 arrays switched on and off using C.0 to C.3
I've made one pattern, but I've nearly used half the memory. I was hoping to put a few diffident patterns in..
Is there a different way to do these type of patterns using less memory?
the massive code below simply makes the following pattern from all L.e.d's on to all off:
11111111111111111111 - step1
11111111100111111111 - step2
11111111000011111111 -step3
11111110000001111111 - & so on looping
11111100000000111111
11111000000000011111
11110000000000001111
11100000000000000111
11000000000000000011
10000000000000000001
00000000000000000000
11111111111111111111
code and diagram (hopefully added here)
Code:
main:
setfreq m32
label_118:
varG = 0 ' repeat - reset var
do until varG = 20 'loop
inc varG 'inc loop counter
high c.2
high c.1
high c.3
low c.0
high 3
high 4
high 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
low c.1
high c.3
high c.0
high 3
high 4
high 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
low c.2
high c.1
high c.3
high c.0
high 3
high 4
high 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
high c.1
low c.3
high c.0
high 3
high 4
high 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
loop 'End of repeat loop
varG = 0 ' repeat - reset var
do until varG = 20 'loop
inc varG 'inc loop counter
high c.2
high c.1
high c.3
low c.0
high 3
high 4
high 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
low c.1
high c.3
high c.0
low 3
high 4
high 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
low c.2
high c.1
high c.3
high c.0
high 3
high 4
high 5
high 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
high c.1
low c.3
high c.0
high 3
high 4
high 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
loop 'End of repeat loop
varG = 0 ' repeat - reset var
do until varG = 20 'loop
inc varG 'inc loop counter
high c.2
high c.1
high c.3
low c.0
high 3
high 4
high 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
low c.1
high c.3
high c.0
low 3
low 4
high 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
low c.2
high c.1
high c.3
high c.0
high 3
high 4
high 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
high c.1
low c.3
high c.0
high 3
high 4
high 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
loop 'End of repeat loop
varG = 0 ' repeat - reset var
do until varG = 20 'loop
inc varG 'inc loop counter
high c.2
high c.1
high c.3
low c.0
high 3
high 4
high 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
low c.1
high c.3
high c.0
low 3
low 4
low 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
low c.2
high c.1
high c.3
high c.0
high 3
high 4
low 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
high c.1
low c.3
high c.0
high 3
high 4
high 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
loop 'End of repeat loop
varG = 0 ' repeat - reset var
do until varG = 20 'loop
inc varG 'inc loop counter
high c.2
high c.1
high c.3
low c.0
high 3
high 4
high 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
low c.1
high c.3
high c.0
low 3
low 4
low 5
low 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
low c.2
high c.1
high c.3
high c.0
high 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
high c.1
low c.3
high c.0
high 3
high 4
high 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
loop 'End of repeat loop
varG = 0 ' repeat - reset var
do until varG = 20 'loop
inc varG 'inc loop counter
high c.2
high c.1
high c.3
low c.0
high 3
high 4
high 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
low c.1
high c.3
high c.0
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
low c.2
high c.1
high c.3
high c.0
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
high c.1
low c.3
high c.0
high 3
high 4
high 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
loop 'End of repeat loop
varG = 0 ' repeat - reset var
do until varG = 20 'loop
inc varG 'inc loop counter
high c.2
high c.1
high c.3
low c.0
low 3
high 4
high 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
low c.1
high c.3
high c.0
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
low c.2
high c.1
high c.3
high c.0
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
high c.1
low c.3
high c.0
high 3
high 4
high 5
high 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
loop 'End of repeat loop
varG = 0 ' repeat - reset var
do until varG = 20 'loop
inc varG 'inc loop counter
high c.2
high c.1
high c.3
low c.0
low 3
low 4
high 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
low c.1
high c.3
high c.0
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
low c.2
high c.1
high c.3
high c.0
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
high c.1
low c.3
high c.0
high 3
high 4
high 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
loop 'End of repeat loop
varG = 0 ' repeat - reset var
do until varG = 20 'loop
inc varG 'inc loop counter
high c.2
high c.1
high c.3
low c.0
low 3
low 4
low 5
high 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
low c.1
high c.3
high c.0
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
low c.2
high c.1
high c.3
high c.0
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
high c.1
low c.3
high c.0
high 3
high 4
low 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
loop 'End of repeat loop
varG = 0 ' repeat - reset var
do until varG = 20 'loop
inc varG 'inc loop counter
high c.2
high c.1
high c.3
low c.0
low 3
low 4
low 5
low 6
high 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
low c.1
high c.3
high c.0
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
low c.2
high c.1
high c.3
high c.0
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
high c.1
low c.3
high c.0
high 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
loop 'End of repeat loop
varG = 0 ' repeat - reset var
do until varG = 20 'loop
inc varG 'inc loop counter
high c.2
high c.1
high c.3
low c.0
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
low c.1
high c.3
high c.0
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
low c.2
high c.1
high c.3
high c.0
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
high c.2
high c.1
low c.3
high c.0
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
low 3
low 4
low 5
low 6
low 7
pause 2 'Wait command
loop 'End of repeat loop
goto label_118
Attachments
-
30 KB Views: 26