Datasheet

* Only if selected in check box – see Loading the Programmer
section
HEX FILE FORMAT FOR PIC18F DEVICES
The programmer loads a Microchip format Hex file. This is an extended Intel
Hex file with code, data, configuration bytes and user ID included. All PIC
tools should follow this format.
Each line in the file has this format:
:BBAAAATT[DDDDDDDD]CC
where
: is start of line marker
BB is number of data bytes on line
AAAA is address in bytes
TT is type. 01 means EOF and 04 means extended address
DD is data bytes, number depends on BB value
CC is checksum (2s-complement of number of bytes+address+data)
Code: This is at the top of the file and may be proceeded by an extended
address line - :020000040000FA, where 04 is the type for extended address
Some compilers include empty code lines (all FF) but others omit these
lines to save space
EEPROM Data: It is proceeded by the extended address line -
:0200000400F00A. The EEPROM section is optional
Configuration bytes: These are stored at 300000h and a preceded by the
extended address line - :020000040030CA
The correct format is 8 Fuse bytes and 6 Lock bytes all on the same line but
different compilers and assemblers have different methods of displaying
these bytes. Sometimes lock bytes are omitted if they are not set, sometimes
the data is spread over multiple lines.
The standard format displays unused bits as 1 (e.g. FF for an unused byte)
but on the PIC device they read as 0. The programmer masks unused bits
to 0 so that the Configuration Byte verify will be correct.
User ID: These are bytes for the user to store data, such as code version
numbers. They are stored at 200000h. Again they are preceded by the
extended address line :020000040020DA
The standard format requires 8 bytes but again some compilers omit unused
bytes.
End of File: The End Of File marker for all Intel Hex files is :00000001FF