I need to randomly select a bit in a table. The table could contain up to 100,000 bits. Held in program memory this is 7143 ( = 1BE7) 14-bit bytes I'd like some comments about various methods to do this, bearing in mind I have the full resources of an F877 to use as either seeds or PRNG, ie ADC, 8 and 16 bit timers, and WDT Some thoughts (a) randomly select byte and then randomly select bit in byte (b) go for the whole 1-100,000 range in one number (c) use ADC on a sine or noise signal at non-synchronous times as determined by WDT (d) add 2 x timer1 values as determined by WDT or ADC value Adding h/w such as white noise is less preferable to using internal pseudo-randomness such as WDT -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body