Unique ID counter


Closed Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838

    Cool Unique ID counter

    Hi guys ,

    I am looking for a way to put a counter value to use as an unique word ID, but with no repeated values untill all values are used 00 00 - FF FF

    Any suggestion on how it might be done automatically when i program a pic and it be assigned to EEprom location for usage in the program.

    Regards

    Sheldon

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


    Did you find this post helpful? Yes | No

    Default Re: Unique ID counter

    If you are using an melabs programmer, you can do that easily with the Serial Number option.

    DT

  3. #3
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: Unique ID counter

    unfortunately i am not , but gee i would really like that option , is there another way , without buying a new programmer ?

  4. #4
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Unique ID counter

    If they are all to carry the same firmware, you can have Microchip program them for you, for a fee. They can program a unique serial number using their Serialized Quick-Turn Programming (SQTP) . But, it might be cheaper to buy a MeLabs programmer
    http://www.scalerobotics.com

  5. #5
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: Unique ID counter

    If you are good in windows programing, try to create VBS, or some .exe, that will change that values in hex file, and send it to programmer, using command line option to start programmer.
    It should be easy job...
    Something like this vbs
    Code:
    Dim i as integer
    strbuff as string
    For i = 0 to 65535
    Open SorceHexPath For Input As #1
        Input #1, strbuff
    Close #1
    
    'Find & Change eeprom value
    
    Open EditedHexPath For Input As #1
        print #1,strbuff
    Close #1
    Shell programerpath -pPIC etc....
    Next i

  6. #6
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: Unique ID counter

    thanks guys , ill try the windows program option , i am not a big VB user but found my way around most things to use it in the past

    but in the long run a new programmer seems a better step, as i am looking to use some of the lastest PIC in the future , 16F1825, 1829 , which my current PIC programer has no hope of doing

  7. #7
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Unique ID counter

    Choose carefully - I'm very happy with the latest greatest PicKit 3 programmer, but it does not seem to have this option.

  8. #8
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: Unique ID counter

    ah thanks for the info , been doing the net search for do almost all pic programmer , its hard to find at a good price for sure

  9. #9
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: Unique ID counter

    well after thinking about 20 mins and that one of the other members here had a melab U2 programmer for sale , i got that ,, so this small option of setting serial when programming should now be solved

  10. #10


    Did you find this post helpful? Yes | No

    Default Re: Unique ID counter

    Another way of doing it would be to use a PIC to store the current serial number in it's eeprom (that way it's not lost if you power it down).
    Use a simple serial link from the 'new' pic that needs a number to the PIC with the serial number count.
    The 'new' send a serial command to the master pic to request a number and the master sends the latest unique number. 'new' pic writes it to it's onboard eeprom and never asks for a new number upon boot.

    It's similar to the way DHCP works on TCP/IP networking... Thats where i got the idea from...

  11. #11
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: Unique ID counter

    another way and i am still looking at this is the product id code built into each pic this is readable and may be unique ,

Members who have read this thread : 1

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