In "PIC your personal introductory course" John Morton suggests simply adding h'27' repetitively. I think that the result won't be quite random, but it does cycle through a long cycle without repeats. Most Pseudo Random numbers require multiplication (or iterative addition) to accomplish. The main requirement is to find a "magic number" that not only maximizes runtimes without repeats but also avoids easy analysis as a "SERIES" so that it is easier to avoid prediction. This might be harder on a "LOW END PIC" than some of the other options. One way of further confusing the issue, is to use a "RANDOM SEED" such as a random number created by a different pseudo random number generator, to generate the base that you multiply/add to etc, every so often. GREY GRAEME SMITH email: grysmith@freenet.edmonton.ab.ca YMCA Edmonton Address has changed with little warning! (I moved across the hall! :) ) Email will remain constant... at least for now. On Sun, 31 Jan 1999, David Sprenkle wrote: > I need some code or a algorithm for generating a 8 bit random number on > a PIC. Does anyone have any code or an algorithm to accomplish this? > > P.S. I need working code or a working algorithm, not theory. Thanks. > I been off the list for a while so I apologize if I am reposting > anything. > > -- > David Sprenkle >