Sunday, 18 August 2019

microchip - Is there a built-in serial number in PIC chip?



I have tens of PIC16 chips. I would like to retrieve some kind of unique serial number from the chip for identification purposes. I know it can be done manually. But it's tedious.


Questions:



  1. Does PIC has a built-in serial number?

  2. If the answer is No, is there a easy way to upload a code with unique serial number to each chip when I order the chip from Microchip?



Answer





  1. No





  2. Is possible, but I don't know what quantities are required, i.e. if they'll do it for tens of devices. We always had batches of at least 1000 parts. It's just like preprogramming with your software, but you indicate at which location(s) the unique ID should be programmed. You'll need to supply the starting ID, and the format (BCD, binary, LSD/MSD first, ...).




Note that this number resides in normal program memory, and it will be erased if you erase the part for reprogramming.


edit
The reason controllers most often don't have this at chip level is that it's expensive: the programming is done by lasering, which is an extra production step. Mass-programmed microcontrollers can easily have the unique ID programmed with the software, and this doesn't require an extra step.


An alternative would be an SSN (Silicon Serial Number) like the Maxim DS2411. These are also laser-programmed, so not cheap either, but you avoid the extra logistic steps, where there can always go something wrong. I've known it happen.
(another edit) Mike suggests a MAC address chip as an alternative. These are EEPROMs which have a unique ID (MAC addresses are globally unique) programmed in a part of the device which is write protected. The rest of the part can be used as normal EEPROM, like for storing device parameters. The EEPROMs appear to be a lot cheaper than the SSN, while serving the same function.





see also
Method for assigning unique per-board addresses


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...