----- Original Message ----- From: Roman Black To: Sent: Thursday, February 08, 2001 9:28 AM Subject: Re: [EE]: high res DA challenge > Bob Ammerman wrote: > > > > > PS. The preferred way to generate good psuedo random > > > numbers is to generate numbers between 0 and 255 (for > > > eaxample) and place in a 256 unit lookup table where > > > there is only ONE of each number, but the postions > > > are random. Then you can read 256 random numbers > > > in sequence and have perfect weighting. > > > > This is really unneeded. > > > > A well designed PRNG (say one based on a shift register with feedback) _ > > will, _by its very design_, generate every possible code in its range. > > > > Bob Ammerman > > > Hi Bob, maybe I misunderstand you, but I still think > the point was valid. If you generate a random number > every time you update the pwm and the number is TRULY > random it could be a disaster. You could generate the > same number every time for an unknown amount of times. > This is the real problem with truly random numbers. Roman, As I said, we were dealing with a PRNG (where P means "pseudo"). These algorithms, given the same starting point, always generate the same sequence and always generate each number exactly once. Actually, it is rather difficult to get a TRUE random number generator in a computer. The only real way is to base it on some completely external stimulus. Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.