Compiled HEX vs. dumped HEX
Peter L. Peres email (remove spam text)
the two HEX file snippets shown indicate the same data. The first one is
typical of compiler and assembler output, with 'holes' where no data is to
be programmed, and not sorted by address, and the second is a full
'canonical' dump, typical of... dumps and (good) linker output.
The only way to compare HEX files is using a checksum computation (which
should be done by ALL the tools, including the programmer). Typical
checksums for PICs are computed by summing the bytes in the device in a 16
bit register, and printing it in hexadecimal (4 figures, modulo 0x10000).
The register is set to 0 at start. Bytes not supplied in a HEX file are
assumed to be 0xFF unless otherwise specified.
If the programmer driver says that the file was indeed programmed and
verified, then you must not worry, because it probably has been ;-) If, on
the other hand, you roll your own (driver) then you should worry ;-) ;-)
See also: www.piclist.com/techref/microchip/devices.htm?key=pic
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the