PDA

View Full Version : " Bin To Intel Hex " ..... The Correct Way ?



darwins
23rd May, 2013, 12:22 PM
Hello Guys.

This has been doing my head in, I'm sure it's my lack of understanding or I'm simply missing a procedure to get this right.

In the attached is an Intel Hex file and my conversion into a BIN file which looks good for what I'm doing.

Now this is my problem:

I can not convert the BIN back to Intel Hex.... :hmmmm2:

I already had the utility HERE POST 15 (http://www.digital-kaos.co.uk/forums/f152/programmer-st10-f-115366/) which will convert the HEX - BIN and should return BIN - HEX but this is not working, In as much as the file is different in size and incorrect when returned back. (See My Attachments)

I have tried WinHex & Win0Ls but it is not successful for me.

Please guys help me if you have the knowledge / procedure.

If you prefer PM me :)

Darwins

camil
23rd May, 2013, 12:37 PM
Both your files seem good intel hex, just one is organised in 16 Byte rows and the other in 32 byte.

:10xxxxxxxxxxx mean 16 byte data block like in file 1
:20xxxxxxxxxxx mean 32 byte data block like in file 2

Every line with his checksum as last data byte. Seem fine to me.

:XX YYYY 00 DDDDDDDDDDDDDDDDDD CS

XX -> Datablock width
YYYY -> Offset to put the data block
00 -> Separator
DDDDDD -> Datablock wide as defined by XX
CS -> Checksum 8bit from XX to the end of DDDD

darwins
23rd May, 2013, 02:11 PM
Thanks camil for taking the time to help, I'm going to study your lesson thank you.

1BANK.BIN.... Original read = 16 byte data block
1BANK_from bin to.HEX (Same file modified from a BIN Back to Hex) = 32 byte data block[

Is there a software that keeps the transformation 16 bit or a formula in Hex Workshop, Winhex that I can change the bit organisation so after returning BIN back to Hex format the file can be compared before writing back ?

camil
24th May, 2013, 08:31 AM
That yellow colour is almost impossible to be read on my iphone screen over white wallpapar in tapatalk :)

darwins
24th May, 2013, 08:03 PM
Sorted.... looks ok on black back ground :)