How to read PIC serial no. from EEPROM with PBP?


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378

    Question How to read PIC serial no. from EEPROM with PBP?

    I understand that Microchip has written the serial number of the chip into EEPROM for 18Fxxxx chips and that it can be read by PBP code. Can anyone tell me where in the chip memory map of a 18F4550 the serial no. is located and how to use PBP code to read it? I would like to use this as a method of uniquely identifying the location/ID of each embedded processor application that contains one of these chips.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    http://www.melabs.com/resources/samp...F/readconf.bas
    PicBasic Pro program to display PIC18F configuration data on LCD.

    This method can also be used to read device id.

    The Special Features section of the data sheet shows the device ID locations.
    Last edited by Bruce; - 10th December 2009 at 15:04. Reason: On-chip ID locations
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Where are the serial number bits?

    Quote Originally Posted by Bruce View Post

    The Special Features section of the data sheet shows the device ID locations.
    Thanks, Bruce, for the code on how to get to the DEVID info. I had seen the DEVICE ID register in the data sheet but didn't see any of the 14 bits that were actually providing a serial number of the individual chip. That is what I am after. From the data sheet DEVID only provides device type (DEVID1<7:5>, device revision(DEVID1<4:0>, device part number (DEVID2<7:0>, none of which appear to be a unique serial number.
    Is my information incorrect that there is a unique serial number somewhere in the chip? I was led to believe it was in there by the following statement in the 18F4550 data sheet:
    "17.10.6.1 Device Descriptor
    The device descriptor provides general information,
    such as manufacturer, product number, serial number,
    the class of the device and the number of configurations."

    This statement doesn't seem to correlate with the DEVID register description in the same data sheet , so if there is a serial number in there it is well hidden in the data sheet info.
    Last edited by jellis00; - 10th December 2009 at 18:12.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Device Descriptor is the USB info contained in supporting files that are included
    at compile time. It's not a serial number embedded in the PIC.

    Browse through some of the USB files in your PBP directory.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    The serial number described in 17.10.6.1 Device Descriptor is that of the USB device you are creating and not that of the PIC18F4550.

  6. #6
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    You can set eight unique User ID Bytes (either at program time with your programmer, or at run time through your program (on 18F types), but there is no actual unique 'Serial Number' embedded into any PIC, just a product family ID (which is usually used by good programmers to warn you if you have inserted an incorrect PIC for the program you are about to burn).

Similar Threads

  1. How to read stored data from MCU EEPROM into PC?
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd October 2009, 15:26
  2. serial to PIC
    By kindows in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 14th July 2009, 13:58
  3. Changing declared variables names on the fly
    By jessey in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 16th December 2006, 06:34
  4. How many serial ports can 1 PIC handle?
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd March 2005, 04:34
  5. 18F252 internal EEPROM / DATA, READ
    By NavMicroSystems in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 1st June 2004, 14:01

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