> From: robin bussell > > > >on the chip. What i'm looking for is a *TRUE* random number generator (that > > >is, as true as posible!) > > > Thanks in advance. > > > If you're using a pic with A/D conversion capabilities then the best > you can do is > to hook up a reverse biased diode as a noise source and sample it when > you need > a random number.. that way they end up proper quantum physics type > random! ... or if you don't have ADC, try timing the interval between two geiger counter pulses (cosmic rays will do, no need for radioactive material). Regarding diodes as noise sources, this should be a zener diode in reverse breakdown, or a transistor BE junction in same condition (about 8V typically). For true uniform distribution, the output of the above techniques should be fed into a polynomial generator, as in CRC generator, or into a linear congruential generator i.e. r = r*a + b. See Knuth, Seminumerical Algorithms, for more details. Merely sampling the level of white noise will give you more or less Gaussian distribution. Sampling geiger counter intervals will give Poisson distribution, I think (my memory of uni physics is fading fast). Regards, SJH Canberra, Australia