ID Location Space on a PIC

18 August, 2009 (03:53) | PIC, Tutorials | By: Joshua

There is a special location set aside on PIC microcontrollers called the ID location that is used for either storing checksum or identification purposes of the PIC.  It has four location spaces, but only the 7 least significant spaces are used.  The different applications of this space is limited only by your imagination.  For my applications, this area has been most useful in holding the version number of the software on a PIC.  As I improve my projects and the firmware on them, I lose track of which board contains which version. Of course, you can use it for whatever purpose you need.

Using this space is straightforward.  Simply use the following code, putting whatever numbers in there you’d like.

__IDLOC(0741);

If you have any further questions, feel free to e-mail me or post a comment.

Write a comment