Random…. More like a scripted Sequence !!!


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Sep 2008
    Location
    Maine, USA
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: Random…. More like a scripted Sequence !!!

    Almost all CPUs (including PICs I think) use a simple logic circuit known as a "pseudo random number generator". It is basically a shift register that feeds back on itself producing a finite series of random numbers. In the pic I believe it is around 36K words long, but I may be wrong. Here is a good article about this:
    http://www.maximintegrated.com/en/ap...ex.mvp/id/1743

    One of my tricks for generating random numbers is to read ambient light using a photocell and a resistor to create a divider. This feeds into any A/D input with as much resolution as you need.

    I have also successfully used pedja089's solution of timing intervals between button presses if they are frequent enough.
    "Do or do not, there is no try" Yoda

  2. #2
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237


    Did you find this post helpful? Yes | No

    Default Re: Random…. More like a scripted Sequence !!!

    Interesting read Tekart..

    Will have a play with the LDR (PhotoDiode) on the ADC.... Sounds like it might work !!

    Thank you all again

    Andy

Similar Threads

  1. Replies: 13
    Last Post: - 5th September 2010, 01:55
  2. How to set sequence of interrupt for PIC
    By chai98a in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 21st June 2008, 11:17
  3. FOR sequence is skipped
    By selbstdual in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 10th August 2006, 02:35
  4. Installation sequence
    By Demon in forum General
    Replies: 23
    Last Post: - 11th July 2006, 03:56
  5. Switch Sequence
    By Tissy in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 13th February 2005, 20:36

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts