Random…. More like a scripted Sequence !!!


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

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

    It is not a bug. Computer systems of all types are, at their core, logic devices - incapable of random or chaotic operation. More complex systems simulate randomness by "seeding" their random generator with, perhaps, the bit-sum of some area of uninitialized memory or an algorithm based on the time and date. In this way they start the "random" sequence at an unknowable (but calculated) location - this gives the appearance of randomness, but is not.

    On such a simple system as the PIC, this "seeding" is left to the designer. You might, for example, loop from 0 to the current value of Timer1 before selecting your "random" value - unlikely "rolls" will be so perfectly timed as to make the outcome calculable.

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


    Did you find this post helpful? Yes | No

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

    Hi all the trick of using the ADC port worked great..... Well for what I need anyway. Added to my little books of tricks ..

    Only issue was the 628 I was using didnt have ADC so migrated to a 818.

    Thank you again...

Similar Threads

  1. Replies: 13
    Last Post: - 5th September 2010, 02: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, 12:17
  3. FOR sequence is skipped
    By selbstdual in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 10th August 2006, 03:35
  4. Installation sequence
    By Demon in forum General
    Replies: 23
    Last Post: - 11th July 2006, 04:56
  5. Switch Sequence
    By Tissy in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 13th February 2005, 21: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