English
Language : 

PIC18FXXK80 Datasheet, PDF (40/52 Pages) Microchip Technology – Flash Microcontroller Programming Specification
PIC18FXXK80 FAMILY
5.3 Embedding Configuration Word
Information in the HEX File
To allow portability of code, a PIC18FXXK80 device
programmer is required to read the Configuration Word
locations from the hex file. If Configuration Word
information is not present in the hex file, then a simple
warning message should be issued. Similarly, while
saving a hex file, all Configuration Word information
must be included. An option to not include the Configu-
ration Word information may be provided. When
embedding Configuration Word information in the hex
file, it should start at address, 300000h.
Microchip Technology Inc. feels strongly that this
feature is important for the benefit of the end customer.
5.4 Embedding Data EEPROM
Information in the HEX File
To allow portability of code, a PIC18FXXK80 device
programmer is required to read the data EEPROM
information from the hex file. If data EEPROM informa-
tion is not present, a simple warning message should
be issued. Similarly, when saving a hex file, all data
EEPROM information must be included. An option to
not include the data EEPROM information may be
provided. When embedding data EEPROM information
in the hex file, it should start at address, F00000h.
Microchip Technology Inc. believes that this feature is
important for the benefit of the end customer.
5.5 Checksum Computation
The checksum is calculated by summing the following:
• The contents of all code memory locations
• The Configuration Word, appropriately masked
• ID locations.
The Least Significant 16 bits of this sum are the
checksum.
Table 5-4 (starting on Page 41) describes how to
calculate the checksum for each device. For these
examples, the ID memory has been set to ‘Use Unpro-
tected Checksum’ in MPLAB IDE®. Please use this
value to determine the value of the ‘SUM(IDs)’ term for
each appropriate code-protected example.
Note:
The checksum calculation differs depend-
ing on the code-protect setting. 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 Word and ID locations can
always be read.
DS39972B-page 40
 2011 Microchip Technology Inc.