Peter F. Klammer said: >Dr. George Marsaglia has documented that some ``true'' (physical source) >random ``white noise'' generators actually fail some tests for randomness >that any good pseudo-random number generator (PRNG) should easily pass. See >his battery of tests at stat.fsu.edu/pub/diehard (pun intended, I'm sure). >There is a simpler set of tests at www.fourmilab.ch/random; you might use >this to screen out weak results before you run DIEHARD, which takes much >longer. So don't assume ``true'' will be better than ``pseudo''. Many thanks for the info. I'm sure the randomness tests will come in useful. >You say ``pulses'' and you don't mention cryptography; are you trying to do >something cryptographic, which requires ``unpredictability'' against a >determined or antagonistic adversary, or is your randomness requirement more >related to uniform distribution and absence of patterns or repetitions? Unpredictability, but without the quotes. The important distinction here is between form and function. Virtually all the discussions I've seen concerning randomness involve the function of the thing - if it's indistinguishable from a random series, then it's just as good. My application (not anything mentioned so far) is reliant on the form, not the function. Genuine randomness is needed for this, in the sense that it must be unpredictable not only in practice but also in principle. Isolation from environmental influences is important - the ultimate would be radioactive decay. I've heard that this is the only way to produce *genuine* random pulses. Thermal noise (including anything electronically derived) is less well isolated, so in this sense can never be perfectly random in form. Yes, I know thermal noise involves quantum effects, but is also heavily tainted by other conditions. Radioactive decay is (I believe) purely quantum-based. One method for the PIC I was told about, which requires no external components, involves setting up the WDT to around 2.5sec timeout and freerunning TMR0. On WDT timeout, TMR0 contains an effectively random number. However, my requirement may well come down to needing a Geiger counter! If the strict isolation I mentioned isn't essential, I'll give other methods a try first - but no algorithms (or lava lamps!). Andy.