Keil™, An ARM® Company

Discussion Forum

How do you convert a HEX file to ASCII

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
brody miles
Posted
22-Mar-2007 10:27
Toolset
None
New! How do you convert a HEX file to ASCII

Hi, Does anyone know how to convert a large (20mb) HEX file into ASCII or another viewable format? What is the fastest method?

Read-Only
Author
Mike Kleshov
Posted
22-Mar-2007 11:18
Toolset
None
New! RE: How do you convert a HEX file to ASCII

Try this:

http://www.keil.com/download/docs/7.asp?bhcp=1

Read-Only
Author
Per Westermark
Posted
22-Mar-2007 11:21
Toolset
None
New! RE: How do you convert a HEX file to ASCII

You haven't told us what kind of format hex the file is in. There are quite a number of formats available.

Read-Only
Author
brody miles
Posted
22-Mar-2007 11:45
Toolset
None
New! RE: How do you convert a HEX file to ASCII

I'm not familiar with the different types of HEX files and am not sure what kind this file is.

Read-Only
Author
erik malund
Posted
22-Mar-2007 11:52
Toolset
None
New! RE: How do you convert a HEX file to ASCII

then show a small piece of it (e.g. CodeWright will dump it) and maybe someone will reciognize it.

Also, if you say why you want it converted to ASCII (I can not see any benfit, but that does not mean that there may not be one).

let Mr. Holmes (whoever in this forum that may be in this case) have a few clues.

Erik

Read-Only
Author
brody miles
Posted
22-Mar-2007 12:01
Toolset
None
New! RE: How do you convert a HEX file to ASCII

I'm a data analysis consultant and am unfamiliar with this data format that I received from a client. We usually receive files in some sort of ascii print or text report and then use analysis tools such as ACL or Monarch to parse them out.

Unfortunately, the data is confidential and i can not post. Just was wondering if there is an easy answer...thanks!

Read-Only
Author
Per Westermark
Posted
22-Mar-2007 12:05
Toolset
None
New! RE: How do you convert a HEX file to ASCII

If the total data is 20MB large, then it might possibly be ok to send the first 3-5 lines of the HEX data.

Read-Only
Author
Andy Neil
Posted
22-Mar-2007 12:16
Toolset
None
New! Intel HEX?

If by "Hex" you mean "Intel Hex", then it already is ASCII!

Intel Hex is an ASCII representation of binary data.

The format is described here:
http://www.keil.com/support/docs/1584.htm
There's also some examples - see if you recognise it!

Read-Only
Author
brody miles
Posted
22-Mar-2007 12:28
Toolset
None
New! RE: How do you convert a HEX file to ASCII

Opening it in UltraEdit using the Hex viewer, it looks like this:

00000000h: 8C C5 97 2B 5C D6 00 00 00 00 93 98 30 00 30 00 ;
00000010h: F5 F2 F0 40 F9 F4 F0 F6 40 40 40 40 40 40 40 40 ;
00000020h: 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 ;
00000030h: 00 00 40 00 00 00 10 00 00 00 00 00 00 00 92 98 ;

I opened it in WordPad and it's a bunch of special characters (boxes, @, etc.)

Read-Only
Author
Andy Neil
Posted
22-Mar-2007 13:29
Toolset
None
New! Binary - not Intel Hex

That's a binary file, then.

UltraEdit is displaying it 16 bytes to a line, and showing the start address to the left of each line:

00000000h: 8C C5 97 2B 5C D6 00 00 00 00 93 98 30 00 30 00 ;
^^^^^^^^^  ^^ ^^ ^^ ^^
Address     |  |  |  +-- 4th byte - at Address +3
            |  |  +----- 3rd byte - at Address +2
            |  +-------- 2nd byte - at Address +1
            +----------- 1st byte - at Address
etc
Read-Only
Author
Per Westermark
Posted
22-Mar-2007 13:44
Toolset
None
New! RE: How do you convert a HEX file to ASCII

Using the HEX viewer?

A hex viewer is what you use when you want to look at a binary file.

If the file is already in hexadecimal format, it is already - as Andy notes - in a form of ASCII.

I don't recognize the binary data, and it doesn't looks to make sense if treated as IEEE floating-point data either.

Read-Only
Author
Andy Neil
Posted
22-Mar-2007 15:29
Toolset
None
New! Not an embedded file format?

"I don't recognize the binary data..."

I don't expect you would: I don't think it has anythihg to do with embedded firmware - the OP says he's a "data analysis consultant"

Read-Only
Author
Hsieh Jeffery
Posted
26-Jun-2007 20:53
Toolset
C51
New! RE: How do you convert a HEX file to ASCII

Hi, I downloaded the tool but it didn't work.
My command is "\>HEX2BIN.EXE serialapi_ctrl.hex"
The message is
{ HEX2BIN Version 1.06
Copyright (c) 1995 Programix Corp.
Portions copyright (c) 1993-1995 BITWARE.
All rights reserved.

ERROR: Could not open HEX file serialapi_ctrl.hex.
Status: HEX to BIN conversion was not successful.
} My OS is WinXP SP2, can any one tell me what's wrong?

Read-Only
Author
Dan Henry
Posted
26-Jun-2007 21:34
Toolset
C51
New! RE: How do you convert a HEX file to ASCII

"can any one tell me what's wrong?"

Is your filename too long?

Read-Only
Author
jjhali ali
Posted
7-May-2007 00:50
Toolset
None
New! RE: How do you convert a HEX file to ASCII

assembeler

Next Thread | Thread List | Previous Thread Start a Thread | Settings