> -----Original Message----- > From: Bob Ammerman [SMTP:RAMMERMAN@PRODIGY.NET] > Sent: Thursday, February 08, 2001 11:41 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [EE]: high res DA challenge > > > 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. As a games > > programmer I coded many psuedo-random generators and > > testers, and this is a good place to start. Maybe a > > search of games programming sites would reveal some > > useful info. People think they are dopey kids but > > they are just as good at what they do as any aerospace > > programmer. > > 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. > And therefore you should be able to calculate the lowest frequency component in your PWM by knowing the longest run of 1's or 0's in the PSBS, and the longest time between comparisons in your loop.(he said, hopefully...) Mike -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.