Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Conver HEX file to integer array

Status
Not open for further replies.

abdoalghareeb

Member level 5
Joined
Feb 5, 2010
Messages
83
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,974
I have this text file which has HEX values for some small image(16X16).
I want a code to read these values from the text file and convert them to integer array (int array_name[x]).
Later I want to send this array to micro controller.

I use C++ Builder 6

View attachment text.txt
 

You'll do this by copying (or including) the text to your code and changing char type to int.
 

I see
But I need that code for access to the text file
(for example if I load the file to Memo1 ,
I have to start from line 7 and read the character for each HEX number after that make converting ...... )
 

The file uses C-syntax and can be read by any C-compiler at compile time. If you want to read it by your own tool for some reason, you can write a parser by using C string functions.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top