Searching \ for 'Random sequence' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/method/math.htm?key=random
Search entire site for: 'Random sequence'.

Truncated match.
PICList Thread
'Random sequence'
2002\08\12@111821 by Dave Gomez

flavicon
face
Hello all,
   Is there a way to a random sequence from either external input, or from
the programming itself.  I¹m doing led dies, and the method used just
flashes through the sequence, until the user stops pushing the button.  I¹d
rather just have them push it once, no long period to hold, to start
sequence, and then have it use a random source to determine the number
instead.

Dave  Gomez

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\08\12@112632 by Sid Weaver

picon face
In a message dated 08/12/2002 11:19:23 Eastern Daylight Time, spam_OUTilinuxTakeThisOuTspamDKGOMEZ.COM writes:


>  Is there a way to a random sequence from either external input, or from
> the programming itself.  I¹m doing led dies, and the method used just
> flashes through the sequence, until the user stops pushing the button.  I¹d
> rather just have them push it once, no long period to hold, to start
> sequence, and then have it use a random source to determine the number
> instead.
>
> Dave  Gomez
>
Hello, Dave

Just write

start
random x
do your flashing thing
goto start

if you make x a byte you get random numbers from1 to 1024.

Sid

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\08\12@203531 by Michael Rigby-Jones

flavicon
face
{Quote hidden}

a single byte :0)
Truly random numbers are not easy to generate, and the topic has been
discussed countless times on the list.  If you want some numbers that simply
appear to be random, you can quite easily make a pseudo-random number
generator in a PIC.  Take a look at
http://www.piclist.com/techref/microchip/rand8bit.htm for some examples.

Regards

Mike

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\08\12@230537 by Dave Gomez

flavicon
face
Mike,
   that's more like it.  I didn't get the random x thing, as I want to use
assembly, not C.

Thanks,
Dave

{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\08\13@050102 by Michael Rigby-Jones

flavicon
face
{Quote hidden}

a single byte :0)
Truly random numbers are not easy to generate, and the topic has been
discussed countless times on the list.  If you want some numbers that simply
appear to be random, you can quite easily make a pseudo-random number
generator in a PIC.  Take a look at
http://www.piclist.com/techref/microchip/rand8bit.htm for some examples.

Regards

Mike

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email KILLspamlistservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body


2002\08\13@104150 by andre

flavicon
face
The simple true random number generator would be to run a timer while the
pushbuton is held down - this timer could increment while the button is
pushed and thus the number generated would be the time the user held the
button down. If a fast incrementing counter is used this would be absolutely
random since you cannot push a button for exactly 34 uS repeatedly,  unless
you have superhuman reflexes.

> {Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...