Random outcome on multiple devices


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: Random outcome on multiple devices

    Quote Originally Posted by Archangel View Post
    I think this would be the same as giving the PIC a fixed seed in the code.
    Exactly!
    Using the U2's incrementing serial number ... Each PIC has a "Fixed Seed".
    But each of the 32 PICs are guaranteed to have a different seed, therefore a different blink pattern on power-up.

    They are all running the same sequence of 65535 pseudo random numbers, but they all start at a different point in that sequence.
    DT

  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

    Thanks for the sanity check guys
    Glad to know I am on the right track.

    I should be able to sort out the serial number start and incremental values but I am curious to know the best place to store the information in flash memory.
    I will be totally honest - I am now working well beyond the limits of my knowledge base. A simple recommendation would be appreciated. A recommendation along with an explanation as to why would superb. I revel in every opportunity to learn something along the way.

    Please note: I have RTFM. Reading is one thing, comprehending is something altogether different.

    Cheers
    Barry
    VK2XBP

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: Random outcome on multiple devices

    I would suggest putting it at the end of Program Memory.

    The 1503 has 2K words of flash, so two locations starting at 07FEh.
    It will store the lowbyte and highbyte separately.



    Code:
    Temp   VAR WORD
    Seed   VAR WORD
    
    READCODE $7FE, Temp
    Seed.LowByte = Temp.LowByte
    READCODE $7FF, Temp
    Seed.HighByte = Temp.LowByte
    I don't have access to a 1503 today, but I think it should work.
    DT

  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

    Legendary response Darrel - thank you!

    I will keep you posted with project milestones as they are reached.

    Cheers
    Barry
    VK2XBP

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