How do I program the PIC® MCU's ID Locations?

Some 8-bit PIC® devices have locations outside the addressable memory area that can be used for storing program information, such as an ID number.

The config pragma is used to place data into these locations by using a special register name. The pragma is used as follows.

where x is the number (position) of the ID location, and value is the nibble or byte which is to be positioned into that ID location.

The size of each ID location varies from device to device. See the device data sheet for more information.

Example 1:

Example 2:

Refer the device datasheet for programming ID Location, and size of each ID location (nibble wide / byte wide).

© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.