Random outcome on multiple devices


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Random outcome on multiple devices

    I can't help thinking there would be some noise on the power you'd see with ADC.
    Interference between ADC pins has always been a problem...

  2. #2
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    172


    Did you find this post helpful? Yes | No

    Default Re: Random outcome on multiple devices

    I am not sure how I would go about un-tapping the noise to produce a random output.
    Would you care to expand your idea for me?

    Cheers
    Barry
    VK2XBP

  3. #3
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Random outcome on multiple devices

    If the device is mains powered there's a 50/60Hz clock on the transformer secondary
    the way old LED digital clocks used to keep time from mains signal.
    If you are looking at that with a pic that has an independent clock the results will vary.

    If you can run an ADC from internal RC clock
    Code:
    DEFINE ADC_CLOCK 3
    and the pic from xtal, and look at any clock or output signal
    generated by the pic program with ADC the results will differ as clocks lose sync.

    I would try the resistor Cap network first (timing cap discharge via resistor).

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: Random outcome on multiple devices

    (Never done this)

    What about reading a resistor on analog pin? A high value, maybe 100K, would that produce a reasonably wide range of seeds?

    Robert

    Edit: since no 2 resistors are exactly alike, the voltage should vary.
    Last edited by Demon; - 15th October 2013 at 19:55.

  5. #5
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Random outcome on multiple devices

    It sounds like it would work.
    That would be the first thing I'd try now, nice one.
    .. and if not, then tapping the centre of a divider (two resistors from +ve to Gnd).
    Still cheaper than timing a cap discharge.

    I can't say I've tried to make two devices produce a different result,
    just one device from one launch to the next.

    Quote Originally Posted by Demon View Post
    (Never done this)

    What about reading a resistor on analog pin? A high value, maybe 100K, would that produce a reasonably wide range of seeds?

    Robert

    Edit: since no 2 resistors are exactly alike, the voltage should vary.

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: Random outcome on multiple devices

    Even better, use a LED and 330R resistor. You're bound to get different voltages and it serves as a power indicator.

    Robert

  7. #7
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    172


    Did you find this post helpful? Yes | No

    Default Re: Random outcome on multiple devices

    Hi Guys,

    All great ideas - thank you.
    I have decided to program each PIC separately making subtle differences to LED flash rates and "off-time" periods to give an overall effect of randomness.
    This is a one-off project that I am doing as a labour of love for my company. As such, I just want to get in and get out as quickly as possible

    Cheers
    Barry
    VK2XBP

  8. #8
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: Random outcome on multiple devices

    Hi,
    One possible issue with using the ADC is that the 12F508 being mentioned in the first post doesn't have one....

    /Henrik.

Similar Threads

  1. Programming multiple pics with multiple programs
    By Luckyborg in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 3rd April 2013, 17:47
  2. Multiple I2c Devices
    By alphaengr in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th January 2012, 04:37
  3. Multiple serial devices to one pic
    By rshaver in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th October 2011, 15:34
  4. 12F683 ADcin = binary outcome!
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 5th March 2010, 04:42
  5. Self update of devices
    By Ioannis in forum General
    Replies: 17
    Last Post: - 24th December 2009, 17:49

Members who have read this thread : 0

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

Posting Permissions

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