Andrew Warren wrote: > > Tjaart van der Walt wrote: > > > Here's the easiest way. You can do it in hardware or software. > > Although it is not *truly* random, it is quite good indeed : > > > > Take a shift register (the longer the better), and tap two or three > > of the stages. Add the taps (discard the carry - it is the same as > > XORing) and feed back into the input of the shift register. > > Tjaart: > > This only works well if you pick the CORRECT two or three taps... > Just choosing an arbitrary pair is unlikely to give a reasonably-long > sequence. > > There are a couple of linear-feedback shift-register routines on my > web page... I agree. The ideal is to use one of the configurations for the P-code generation for GPS pseudo random codes. (A couple of hundred days at 10.23Mbps before it repeats itself) The normal C/A code is easy to generate with just two shift registers (1023 bits before it repeats itself). -- Friendly Regards Tjaart van der Walt mailto:tjaart@wasp.co.za _____________________________________________________________ | Another sun-deprived R&D Engineer slaving away in a dungeon | | WASP International http://wasp.co.za | | GSM and GPS value-added applications | | Voice : +27-(0)11-622-8686 | Fax : +27-(0)11-622-8686 | |_____________________________________________________________|