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.

Memory issue in PIC18F4550

Status
Not open for further replies.

innovetion

Newbie level 6
Joined
Oct 16, 2015
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
92
Hello,

I am using PIC18f4550. My program is too long. So eventually my data memory has been reached to 100% usage and my program memory at 13%.
So right now, I can't compile my program. So is there any way to use program memory instead of data memory ?

Thanks.
 

No, you can't use ROM as RAM except in some special circumstances. You might be able to do it in that PIC but the ROM memory has limited re-write cycles and the writing process is much slower than equivalent RAM so I would not recommend it.

If your data is fixed, such as look-up tables or message strings, you might be able to relocate them in program ROM. How you do that will depend on what language you wrote the program in. If it's 'C' you can declare fixed data as 'const', the method is different in other languages.

Brian.
 
Hi,

how much effort did you spend to optimize in size?

Usually you know what piece of code needs the most memory space. Try to optimize it. Or post it here, so we can give you recommendations.

Klaus
 
Can't you store your data compressed, for example with huffman coding?
 
So is there any way to use program memory instead of data memory ?

you can store all your fixed texte message in Flash program area, or into the PIC EEPROM to save RAM space.
and if you don't use USB , USB RAM AREA ..
What compiler ?
 
Thanks to all for replying.
Problem got solved by code optimization.
 

I'm sorry but the solution (code optimisation) does not fit with your original problem description where you say that you are at 100% of DATA memory but only 13% of program memory. Code optimsation would further reduce the 13%!
Susan
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top