![]() Your device will have to be tested after it is built anyway, so adding a step to program the PIC is usually very little extra burden.Add the id column like this, and the column will be filled with serial numbers automatically, and indexed as PK: ALTER TABLE public.ecdict ADD COLUMN id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY The lead times are long and you'll be stuck with old versions in the pipeline. If you think you'll be upgrading the firmware regularly, then don't use factory programming. However, factory programming is only for mature high volume products. If you get your PICs programmed by the Microchip or a distributor, you can usually get them serialized in some way. These differ from general program memory or EEPROM in that they can be read even when the chip is code protected. If the serial number is to be read from outside, then the user ID locations that most PICs have might be the appropriate place to store it. This way if they mess up something on the computer and restore from backup, it won't also reset the serial number range. This is especially useful if you have a remote manufacturer building units for you. When it's assiged serial number range is exhausted, it refuses to work. The system asks the jig for a new number, and this jig is designed to never give out the same number twice. The temporary HEX file is used to program the part, then deleted.įor better robustness, you store the serial number state in EEPROM in the production jig, not in a disk file. You write a small program that grabs a new serial number according to whatever your strategy is, reads the master HEX file, substitutes the new serial number for the blank one, and writes out a temporary HEX file. One easy way is to start with a master HEX file as produced by the firmware tools. During the production test process when the firmware is programmed into the PIC, you set it up to also get a unique serial number and program that in too. If you really meant serial number, then this has to be programmed into the part after production. PIC programmer software that can identify a arbitrary PIC is not trivial. All the other PIC can be identified electrically, although there are quite a number of differing ways they have to be put into programming mode and then the chip ID read out. As far as I can tell, only the 12 bit core PICs don't have such a chip ID. This can be read by a PIC programmer to determine the type of PIC it is connected to. Most PICs do have a chip ID encoded into them. Let's be clear that we're talking about a number that would vary between two chips of the identical model. Method for assigning unique per-board addressesĪs Steven said, PICs don't have unique serial numbers built into them at manufacturing time. The EEPROMs appear to be a lot cheaper than the SSN, while serving the same function. The rest of the part can be used as normal EEPROM, like for storing device parameters. These are EEPROMs which have a unique ID (MAC addresses are globally unique) programmed in a part of the device which is write protected. (another edit) Mike suggests a MAC address chip as an alternative. These are also laser-programmed, so not cheap either, but you avoid the extra logistic steps, where there can always go something wrong. Mass-programmed microcontrollers can easily have the unique ID programmed with the software, and this doesn't require an extra step.Īn alternative would be an SSN (Silicon Serial Number) like the Maxim DS2411. 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. Note that this number resides in normal program memory, and it will be erased if you erase the part for reprogramming. ![]() You'll need to supply the starting ID, and the format (BCD, binary, LSD/MSD first. It's just like preprogramming with your software, but you indicate at which location(s) the unique ID should be programmed. We always had batches of at least 1000 parts. Is possible, but I don't know what quantities are required, i.e.
0 Comments
Leave a Reply. |