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.

HEX File & Flash Memory

Status
Not open for further replies.

albus

Junior Member level 2
Joined
Dec 26, 2010
Messages
22
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,458
So I'm using PIC16F877A for a project. In the data sheet it says that flash program memory is 8K. However my compiled hex-file is 21 KB, or so says windows vista.

When I install the hex file in to the PIC, it doesn't give any error messages. I'm a bit confused, how is this possible ?
 

Don't mix up hex with bin file format. The hex file format is a text file containing destination address, data, checksum etc.
See here for details: https://en.wikipedia.org/wiki/Intel_HEX
If you convert the hex file to a bin file, which is the real raw data, this would be smaller than 8kB.
 
  • Like
Reactions: albus

    albus

    Points: 2
    Helpful Answer Positive Rating
Thank you, is there a way to roughly calculate the bin file size from a hex file ?
 

You could use a hex2bin converter to find that out. But usually you want to know how much of the available rom size is consumed up by your program.
So better will be forcing your linker to generate a map file. This map file, which is a text file, contains detailed information about the used ram and rom size etc.
By default the generation of a map file is usually not activated. So check out your compilers manual how to do that. Very often this file is named xyz.map
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top