Andrew Warren wrote: > Tony Smith wrote: > >> The problem with the rotate & carry routines is they repeat, eg after 65k >> operations (16 bit register). > > Tony: > > That property is hardly unique to LFSRs. Since pseudo-random number > generators are deterministic algorithms run on deterministic machines > with finite memory, they ALL repeat. Unless you are going to add in environmental noise, such as a noisy diode or some other thing, you will be stuck with LFSRs or the like. You can use more than one LFSR and do clever things by combining the values in special ways, incrementing only one LFSR, or using one to select how many values to skip in the other, etc. They are still pseudorandom, though. If all you are doing is choosing a color to display on a RGB LED, does it really matter if it repeats? Or how often? --Michael -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist