> > If you want it to generate for instance a random byte you must call > > it 8 times, otherwise there will be a very strong correlation > > between successive bytes. > > It depends on what you're doing. Calling the LFSR 8 times does not > result in an output value that is any less predictable than calling > it once (and ALL the bits change, even if you've only generated one > new random bit, so it looks pretty good if you're simulating a > flickering > fire, or generating noise, or something like that.) That output value "an sich" is indeed not less random than any other value. In fact it is as random as 0b00000000. Randomness is all about correlation. When you call just once and grab 8 bits you will have 7 bits of the previous value (shifted one position) + one (pseudo) random bit. That will not look very random when shown on 8 LEDs. Wouter van Ooijen -- ------------------------------------------- Van Ooijen Technische Informatica: www.voti.nl consultancy, development, PICmicro products docent Hogeschool van Utrecht: www.voti.nl/hvu -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist