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