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.

[SOLVED] Hex file size exceeds the inbuilt ROM of the PIC18f4550

Status
Not open for further replies.

MrSingh

Newbie level 5
Newbie level 5
Joined
Mar 21, 2014
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
69
The size of Hex file which is to be burned in the pic18f4550 exceeds the inbuilt capacity of the IC i.e. my hex file code is around 50KB while the mcu has Rom of 32KB.
I would like to know the options which i can do so that i can use the same IC .Please Help.
 

There is not much that you can do but ask yourself some questions.
Are you asking the processor to do too much?
Have you coded the task efficiently, you neeed to code for size in this instance. I prefer to code in assembler for these PICs rather than use a C compiler, I have not had good experiences with the 8 bit compilers in the past, they have generated large files for simple tasks. That was a few years ago perhaps they are beter these days.
Peter
 

hello,


Hex size is not the real image of the size supported by the MCU

example:
if i build my C18 program ..using a 18F26K22 (very confortable!)
and memory gauge gives me :
Programm Memory 20681/65536 data memory 1735/3896

With normal "build" , i get an *.hex size of 53Ko
but if i export the result as *.hex file i get a size of 183Ko !!
and use it with my Pickit2
i am using export result to be sure to include all (ID ,bit config,Eeprom...)
 
@paulfjujo didnt understood what you are saying

i am using Pickit2 4 burning and my complier is mickroC Pro for PIC
and this is attached of the messages after i build my code 1.jpg
The size of hex file generated is 42Kb while i PIC18f4550 has rom of 32 KB will it work?

i tried burning the hex file the file burnt into the mcu and pickit2 verified it successfully .
When i exported the code from ic i got a file with 90KB size so the pic18f4550 supports 90kb hex file?

but in datasheet it is given that it has only 32 KB ROM
please help
 

The image suggests you have plenty of space left.

Please remember that the HEX file is a text representation of the hexadecimal bytes with the load addresses and checksums also in the file. It isn't the same as the binary image of the file that the Pickit loads into the IC. You can open and inspect the contents of a hex file in a text editor while the actual PIC codes are in unreadable binary. The Pickit reads the hex file, extracts the addresses and data from it, verifies the checksum and finally programs a binary version of it into the PIC. Because of the extra information in the hex file and because it is text, it will typically be 2.5 to 3 times the size of its binary equivalent.

Brian.
 
Thanks for the information and clearing my doubts about the HEX file.
I thought that the size of hex file which are used for burning into the IC must be equal to ROM of IC.
Today i tried increasing the size of hex file and found that the mickroC does not make hex file if the size of the ROM is exceeded .
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top