Reply to thread

Incidentally - I wrote a PIC program that should be equivalent to the "fire effect" circuit I linked, to see how the effect would look...  I think the quality of the effect varies a bit depending on how fast it's run...  I ran it at around 30 Hz and I think the effect was pretty good.  It's not a true random sequence, of course, and if you run it for a certain amount of time it will loop back to its original state...  The circuit can only take on 256 possible states (8 bits in the shift register) and I think the sequence as run actually goes through about 220 states before looping back to the beginning...  So if you watched the blinky for about 7 seconds, and then watched it for another 7 seconds, you should see the same pattern repeat...  But in practice I can't spot it.  I'd say it's "random enough" for the effect...  Though if I were running multiple flickering LEDs in a single display I might worry that their patterns would look too similar...  Something to test, I think.


(EDIT): And for more fun, here's a Wikipedia article on this type of random number generation: it's called Linear Feedback Shift Register.  One of its big advantages is that it's easy to implement in hardware (as with the circuit I linked) or on simple microcontrollers like the PIC.


Back
Top