Random outcome on multiple devices


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    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 Art,

    In what part of the "Land Down-Under" do you reside?
    I am in Sydney's southern suburbs.

    Thanks for the quick reply.
    Noise detection systems are overkill for this project. I was hoping that the power up sequence for individual devices would have provided some degree of variation.
    What if I used a timer based system to generate the seed and then de-tuned the internal oscillator between various devices to get some spread of variation - do you think that would work?
    Alternately, I could cascade a pulse from PIC to PIC and emulate a button push... just thinking out aloud here.

    Cheers
    Barry
    VK2XBP

  2. #2
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Random outcome on multiple devices

    Close to Brisbane here

    There are always things you can try. Maybe PicBASIC's POT command.
    only instead of using a potentiometer, try a fixed value resistor,
    and maybe a reading with POT will vary enough with temperature
    (if you had to produce multiple units and keep firmware identical).

    Once with the Sony PSP I got random numbers by looking at the audio input

  3. #3
    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,
    It all depends on where you want to introduce the variation.... If you by "detune" the oscillator mean to tweak the OSCTUNE register slightly between devices then you might as well program in a different seed from the get-go - there will be a unique program in each device either way.

    Perhaps you can use something like the RCTime command with an external RC (duh...) network to generate the seed and rely on the tolerance of the R and the C to get the needed variance.

    /Henrik.

    EDIT: Art beat me to it while I was typing and doing some other things.

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


    Did you find this post helpful? Yes | No

    Default Re: Random outcome on multiple devices

    Great suggestions guys - thank you.

    I will look at the POT/RCTime commands and choose wide tolerance components or random values to achieve the desired variation.

    Cheers
    Barry
    VK2XBP

  5. #5
    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...

  6. #6
    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

  7. #7
    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).

  8. #8
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,170


    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.

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