PDA

View Full Version : INH8XM HEX file structure



flotulopex
- 30th December 2006, 20:29
Hello,

I want to load my PIC's program memory with data, quite a lot of data.

The idea is to flash the PIC with a HEX file that has been composed of:
a.- the program;
b.- the data.

In fact, it is about to merge two HEX files - the first with the program, the second with the data.

It is not clear to me how I have to read the INH8XM HEX file.

Bits look to be inverted per pair; the adress is not clear to me, etc.

Does anyone know about this? Are there some tools to make HEX files from, i.e. a TXT file?

skimask
- 30th December 2006, 22:46
Hello,

I want to load my PIC's program memory with data, quite a lot of data.

The idea is to flash the PIC with a HEX file that has been composed of:
a.- the program;
b.- the data.

In fact, it is about to merge two HEX files - the first with the program, the second with the data.

It is not clear to me how I have to read the INH8XM HEX file.

Bits look to be inverted per pair; the adress is not clear to me, etc.

Does anyone know about this? Are there some tools to make HEX files from, i.e. a TXT file?

I've got a HEX file merging program ( bin2hex.exe) that allowed you to set offsets, select the type of files to merge, etc.etc. If I recall correctly, I got it from one of those freeware/shareware sites awhile back. This might be what you want. Get me your email and I'll fire it off to ya.
The way I used it is as follows:
I created a program with PBP, compiled it, assembled it, and had a .hex file as the result. I looked at the .lst file, found the address for the end of that file and used that as one of the parameters for the bin2hex program.
I also had another file which was a patch file that the original program would read from program memory and upload to another chip via I2C.
So, once I had both hex files, I ran the bin2hex program (with the correct parameters set up) and the result was a merged file.
The only problem I ran into while using it was numbering. The end of my hex file was something like $1500. But when I used the bin2hex program, I had to tell it to add in the 2nd file using a starting address of either $2A00 or $5400 (x2 or x4), I don't remember which one ended up working. One program though in terms of bytes, the other in double-words... Easily fixed...