> > Since they repeat, you need some method of jumping around > in the sequence. > > The Basic 'Randomise Timer' was commonly used as the value of TIMER > > (system > > clock) would change, so the starting point in the sequence would > > change. OF course, if the program happened to start at exactly the > > same time, you get the same sequence of numbers. > > > > In a PIC, you'll need to find something like that, > typically from the > > environment. Like Jinx said, maybe the WDT (temperature > sensitive). > > Hook a light detector to an ADC. Measure cycles between > keypresses and so on. > > > > Personally, having the PRNG run continuously might be the > easiest option. > > No guaranted to be random though. > > > > Tony > > > > > Gaming devices use white noise generators which run all the > time. A random number is "pulled" from that hardware device > when needed. These random events are created by biasing a > specially doped diode, amplifying the signal, and measuring > the interval between these quick events. > > Randomization is the most difficult thing to accomplish for > gaming devices, and state gambling boards require independent > testing of each slot machine's randomizer before certifying its use. > > I have seen slot machines pulled for hitting too many > jackpots, though; the operators lose confidence in them. > > --Bob. I've seen circuits for that somewhere. Intel (I think) had a plan a few years back to put hardware RNG on PC motherboards. Can't remember if it was to go in the CPU (unlikely) or a separate chip. Apparently it wasn't random enough. I'd say manufacturers didn't want to cough up a few more cents. Some IVR (telco) gear I worked on had its RNG certified by the British gaming lot (whoever they are) as being random enough. Tony -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist