Electronic – 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.


  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?

Best 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.

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