You can feed AC 60Hz to this pin... Or HP filtered 60Hz... On 24 Sep 2006 at 20:10, John Chung wrote: > I have and idea. A wild one. Get a reading off a > floating pin using the ADC. Use the value as a seed. > And reseed the generator after certain iteration. > Sound like an idea. Floating pins do not provide a > stable value and their values are within a limited > range. But when you keep on reseeding a value things > get pretty wild. > > John > > --- Tony Smith wrote: > > > > > Look carefully, and I think you'll figure out > > that the functions on > > > > the page referenced ARE implementations of > > Galois LFSRs. > > > > Particularly clever implementations thereof that > > don't look > > > like they > > > > contain nearly enough instructions do so ... > > > > > > The page also contains a few others that look a > > bit dodgy. I > > > was mainly aiming at the one at the top, that > > claims to > > > rotate with carry and to output that as random > > (AFAICT). > > > > > > The problem with the rotate & carry routines is they > > repeat, eg after 65k > > operations (16 bit register). Not that you'd notice > > in most cases. > > > > Also think about how to seed the routine, a way to > > cause the routine to jump > > to a different spot in the sequence. In other > > words, start the register at > > a number, not 0. Like in old BASIC games, where > > RANDOMIZE TIMER was used to > > seed the routine. (And it always gave the same > > sequence too for the same > > seed.) > > > > A typical method is that the routine always runs, > > and when the user presses > > a button it outputs the current value in the > > sequence. Ok for a dice > > rolling app, not so good for something that doesn't > > have any inputs. > > > > Tony > > > > -- > > http://www.piclist.com PIC/SX FAQ & list archive > > View/change your membership options at > > http://mailman.mit.edu/mailman/listinfo/piclist > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist