slow spin
mctrivia
Posts: 3,772
I have built a 60x14 led display(840 pixels) with the following code there is a visible blink.
my math says 80MHz/60/840=1587 cycles per pixel to not blink. cant figure out how the interpreter could be that slow
dira[noparse][[/noparse]25..16]~~ repeat repeat ubVb from 0 to 13 outa[noparse][[/noparse]25..22]:=ubVb Multi:=1<<ubVb repeat ubVa from 0 to 59 if Long[noparse][[/noparse]@ulDisplay][noparse][[/noparse]ubVa]&Multi outa[noparse][[/noparse]21..16]:=ubVa else outa[noparse][[/noparse]21..16]:=$3F
my math says 80MHz/60/840=1587 cycles per pixel to not blink. cant figure out how the interpreter could be that slow
Comments
I'd recommend you use assembly for that or you split it across two COGs (with SPIN) but you may need to rewire part of your matrix. Asm is the way to go
ASM is the solution
Spin is·slow
Spin control is useful for processes that do not need speed
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Does the curiosity killed the cat?
This problem is also present with #ptrToDisplay which again produces the address of the register in the cog's rams, not the stuff in the address.
Those are the biggest flaws I see in the code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
Post Edited (Kye) : 1/21/2009 3:52:58 AM GMT