2008-2015 Microchip Technology Inc. DS30009687F-page 27
PIC18F2XJXX/4XJXX FAMILY
5.1 Device ID Word
The Device ID Word for the PIC18F2XJXX/4XJXX
Family devices is located at 3FFFFEh:3FFFFFh.
These read-only bits may be used by the programmer
to identify what device type is being programmed and
read out normally, even after code protection has been
enabled. The process for reading the Device IDs is
shown in Figure 5-1. A complete list of Device ID
values for the PIC18F2XJXX/4XJXX Family is
presented in Table 5-8.
FIGURE 5-1: READ DEVICE ID WORD FLOW
5.2 Checksum Computation
The checksum is calculated by summing the contents of
all code memory locations and the device Configuration
Words, appropriately masked. The Least Significant
16 bits of this sum are the checksum.
The checksum calculation differs depending on
whether or not code protection is enabled. Since the
code memory locations read out differently depending
on the code-protect setting, the table describes how to
manipulate the actual code memory values to simulate
the values that would be read from a protected device.
When calculating a checksum by reading a device, the
entire code memory can simply be read and summed.
The Configuration Words can always be read.
TABLE 5-8: DEVICE ID VALUE
Device
Device ID Value
DEVID2 DEVID1
PIC18F24J10 1Dh 000x xxxx
PIC18F25J10 1Ch 000x xxxx
PIC18F44J10 1Dh 001x xxxx
PIC18F45J10 1Ch 001x xxxx
PIC18LF24J10 1Dh 010x xxxx
PIC18LF25J10 1Ch 010x xxxx
PIC18LF44J10 1Dh 011x xxxx
PIC18LF45J10 1Ch 011x xxxx
PIC18F25J11 4Dh 101x xxxx
PIC18F24J11 4Dh 100x xxxx
PIC18F26J11 4Dh 110x xxxx
PIC18F45J11 4Eh 000x xxxx
PIC18F44J11 4Dh 111x xxxx
PIC18F46J11 4Eh 001x xxxx
PIC18F24J50 4Ch 000x xxxx
PIC18F25J50 4Ch 001x xxxx
PIC18F26J50 4Ch 010x xxxx
PIC18F44J50 4Ch 011x xxxx
PIC18F45J50 4Ch 100x xxxx
Start
Set TBLPTR = 3FFFFE
Done
Read Low Byte
Read High Byte
with Post-Increment
with Post-Increment
PIC18F46J50 4Ch 101x xxxx
PIC18LF2450 4Ch 110x xxxx
PIC18LF25J50 4Ch 111x xxxx
PIC18LF26J50 4Dh 000x xxxx
PIC18LF44J50 4Dh 001x xxxx
PIC18LF45J50 4Dh 010x xxxx
PIC18LF46J50 4Dh 011x xxxx
PIC18LF24J11 4Eh 010x xxxx
PIC18LF25J11 4Eh 011x xxxx
PIC18LF26J11 4Eh 100x xxxx
PIC18LF44J11 4Eh 101x xxxx
PIC18LF45J11 4Eh 110x xxxx
PIC18LF46J11 4Eh 111x xxxx
PIC18F26J13 59h 001x xxxx
PIC18F27J13 59h 011x xxxx
PIC18F46J13 59h 101x xxxx
PIC18F47J13 59h 111x xxxx
PIC18LF26J13 5Bh 001x xxxx
PIC18LF27J13 5Bh 011x xxxx
PIC18LF46J13 5Bh 101x xxxx
PIC18LF47J13 5Bh 111x xxxx
PIC18F26J53 58h 001x xxxx
PIC18F27J53 58h 011x xxxx
PIC18F46J53 58h 101x xxxx
PIC18F47J53 58h 111x xxxx
PIC18LF26J53 5Ah 001x xxxx
PIC18LF27J53 5Ah 011x xxxx
PIC18LF46J53 5Ah 101x xxxx
PIC18LF47J53 5Ah 111x xxxx
TABLE 5-8: DEVICE ID VALUE (CONTINUED)
Device
Device ID Value
DEVID2 DEVID1