On a similar note, check out the last two issues of Nuts&Volts. A nice series on random number generation using atmospheric noise sampling techniques and the application of random numbers to one time encryption pads; fun reading Madhu -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Tim Webb Sent: Thursday, May 29, 2003 1:38 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]: Generate a random number? Knowing that most if not all computers use a seed to start creating there random number and therefore if you reset your computer you would always get the same random number first, second, third etc. But if you could add a real time clock and multiply the month*day*year*hours*minutes*seconds * or / by the (seeded) pseudorandom random number, you would always have a unique random number. Then you can use and If/than to repeat the random number until it fits within your desired range 8 or 16 bits etc. -----Original Message----- From: Michael Rigby-Jones [mailto:Michael.Rigby-Jones@BOOKHAM.COM] Sent: Thursday, May 29, 2003 7:40 AM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]: Generate a random number? > -----Original Message----- > From: Bob Axtell [SMTP:engineer@COTSE.NET] > Sent: Thursday, May 29, 2003 3:16 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC]: Generate a random number? > > No. It can't be done with ANY computer. All computers generate precise > results, although you can get a pseudorandom result that might satify you. > > The way most people do it is to amplify the noise of a zener diode > operating just at the threshold. Special diodes are created for the > purpose. They are called "PINK NOISE" or WHITE NOISE" diodes. They then > divide down the pulses and measure the count in a finite period. > Being pedantic, there is no such thing as a pink noise diode. An avalanche breakdown diode (e.g. zener) can produce (a close approximation to) white noise, this then has to be filtered (3dB/octave) to obtain the pink noise. Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= Any questions about Bookham's E-Mail service should be directed to postmaster@bookham.com. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.