I got the 8x8 LED matrix soldered together a while ago but I did not properly plan the control board for it so I've had to breadbord it as much as possible. I have written a program where a single LED lights up, and goes in a circle around the edge of the 8x8. This animation alone takes up 2028 bytes of 2048. Is there a way to condense the program?
The pulse is sent to a 4017 decade counter, the first pulse is for the reset the other for the clock pin. I am doing each "frame" of the matrix like this:
This frame is just the upper left LED lighting up. And I repeat that 29 times in total if I've got it right. Is there anyway to make things take less space? If I was going to send a binary number I could do it like this:
But with the matrix it's not like a sequence of binary numbers, it's different patterns that need to be mapped individually for each row in every frame. What to do?
The pulse is sent to a 4017 decade counter, the first pulse is for the reset the other for the clock pin. I am doing each "frame" of the matrix like this:
Code:
let dirsB =%11111111
let dirsC =%11111111
let pinsB =%11111111
let pinsC =%00000000
let b0 = 0
main:
'
'frame 1
for b1 = 0 to 5
pulsout C.0,10
let pinsB =%10000000
pause b0
let pinsB =%00000000
pulsout C.1,10
let pinsB =%00000000
pause b0
let pinsB =%00000000
pulsout C.1,10
let pinsB =%00000000
pause b0
let pinsB =%00000000
pulsout C.1,10
let pinsB =%00000000
pause b0
let pinsB =%00000000
pulsout C.1,10
let pinsB =%00000000
pause b0
let pinsB =%00000000
pulsout C.1,10
let pinsB =%00000000
pause b0
let pinsB =%00000000
pulsout C.1,10
let pinsB =%00000000
pause b0
let pinsB =%00000000
pulsout C.1,10
let pinsB =%00000000
pause b0
let pinsB =%00000000
next b1
Code:
for b0 = 0 to 15
let pinsB =%b0
next b0