Searching \ for '[PIC]: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/microchip/math/index.htm?key=random
Search entire site for: 'Random sequence'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]:Random sequence'
2002\08\12@115341 by Doug Hemingway

picon face
If the button is interrupt serviced, then almost any button press will generate a random number with just a simple counter (not too many people I know can repeatably stop a counter with a 4 MHz clock).  Just read the bottom 3 bits of the counter, subtract 1 if greater than 6 or less than 1, and you're there.  This DOES introduce a less than totally uniform distribution if you need true randomness--then you must do a little more work and implement a mod-6 counter.

--Doug

Dave Gomez wrote:
{Quote hidden}

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


2002\08\12@133443 by Mike Singer

picon face
Doug Hemingway wrote:
> If the button is interrupt serviced, then almost any button press will
> generate a random number with just a simple counter (not too many
> people I know can repeatably stop a counter with a 4 MHz clock).  .
.
Doug,
get involved in Casino business to find out what people can do to cheat gaming machines for making a _LOT OF MONEY_ . 8-[
In this case, I think, some RF device will work.
 Mike

> Dave Gomez wrote:
>> 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.
 
--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


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