Re: Random…. More like a scripted Sequence !!!
Almost all CPUs (including PICs I think) use a simple logic circuit known as a "pseudo random number generator". It is basically a shift register that feeds back on itself producing a finite series of random numbers. In the pic I believe it is around 36K words long, but I may be wrong. Here is a good article about this:
http://www.maximintegrated.com/en/ap...ex.mvp/id/1743
One of my tricks for generating random numbers is to read ambient light using a photocell and a resistor to create a divider. This feeds into any A/D input with as much resolution as you need.
I have also successfully used pedja089's solution of timing intervals between button presses if they are frequent enough.
"Do or do not, there is no try" Yoda
Bookmarks