Michael Rigby-Jones wrote: >> Some time last week I was thinking about randomness and such >> and I came up with an idea. I haven't had time to research it, >> but I do find it intriguing. What if you took two separate >> oscillators (possibly drifty RC oscillators with widely >> different tempcos) and fed them into a shift register -one as >> data the other as clock. Since they're not directly related to >> each other, their relative phase will continually drift - >> producing a continuous stream of uncertainty on the shift >> register. > > The relative frequencies of the two oscillators will have a constant > frequency difference in the short term so the output bit stream will be > very predictable and most unrandom IMHO. Short term is OK if it's used as an external perterbation of a digital random number generator. Imagine the reverse. What would it take to create a 1/0 digital stream using analog oscillators that is accurate enough to cause even an 8 bit CRC to repeat consistently? What about a 16, 24, 32, or more bit CRC? You couldn't design such a system even with atomic clocks, and a CRC is pretty simple to compute in a PIC and only requires 4-8 bytes of state. The more state and therefore longer repeat sequence (assuming a reasonable algorithm) of the digital random number generator, the less often it needs an external random input to make the output indistinguishable from a truly random 1/0 stream. I'd be more worried that the two analog oscillators might have a little coupling between them and sync up at a sub-harmonic. That makes them no longer two independent events. Of course, if the PIC oscillator is separate and not coupled, that can be the second independent clock. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist