Search code examples
embeddedpicfirmware

Verify unique ID number before writing a new number in PIC18F


Each chip should be unique by number, so I want to prevent that a chip would be burned twice. It's a gap in the order.. Each number should be used.

I have searched the internet and found out how to write unique numbers on specific place called "User ID".

Therefore I have got two files: -"Myprogram.hex" -"MyUniqueNumber_SQTP.num"

I use MPLAB X v3.35 and the IPE version for writing.

Does any one know if there is a program that verify a "User ID" (which is common) before writing the microchip. For example.. blank check

I know that the IPE will generate a combined hex file for that "one" chip. That is possible because the unique number is on address(hex): 200000-200007 The main program doesn't use this address.


Solution

  • If you use PICKIT 3, which supports SQTP, you can probably use its command line interface (pk3cmd.exe, bundled with the MPLAP IDE). You can first read either the the ID Memory (using -GI) or a portion of memory (using -GP) to a file and then verify whether it's already burnt. It would be easy then to integrate this to a JAVA/.Net application to automate the process.

    For other debuggers there should be similar CLI.

    PK3CMD command line options