Microchip INHX32 HEX-record Format

This is the data format Microchip Technology uses for processors that have memory mapped at 8000h (32k) and higher. In most aspects is it identical to the INHX8M format. The difference between an INHX8m file and an INHX32 file is the presence of type 04 records. The type 04 record extends the maximum address from 16 bits to 32 bits. For all type 04 records the byte count is 02 and the address field is 0000. The two data bytes represent the upper 16 bits of the 32 bit address for all subsequent type 00 records until the next type 04 record. If the file does not begin with a type 04 record, the upper 16 bits default to 0000.

Consider the following two record example from an INHX32 file.


The first record is explained as follows:
    :     Start code.

    02    Two data character pairs in all type 04 records.

    00    Four-character 2-byte address field, 0x0000.
    00    Address field is 0000 for all type 04 records.

    04    Record type 04 is extended linear address record.

    00    Four-character 2-byte data field representing the upper 16 
    01     bits of an extended linear address, 0x0001

    F9    Checksum.

The second record is explained as follows:
     :     Start code.

     02    Two data character pairs in this data record.

     00    Four-character 2-byte address field showing
     0E     address 0x000E.

     00    Record type 00 is data record.

     E4    Low byte of PIC data word.
     C9    High byte of PIC data word, 0xC9E4.

     43    Checksum.

00010000   The extended linear address
    000E    plus the address from the data record          
0001000E     yields the effective address for the data (0xC9E4).

Because the address is doubled the actaual PIC word address is 
0x0001000E/2 = 0x8007

[ Back to Data & Documentation ] [ Home ]