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.

pic18f452 program memory optimisation

Status
Not open for further replies.

zeroskj1988

Member level 2
Joined
Jul 7, 2011
Messages
46
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,588
i am using pic 18f452 for a monitoring system
after completion of about 80% of program my program memory is at its 90% utilization.i observed that mainly two functions are consuming lot of memory,that functions are unavoidable in my circumstances. can any body suggest any method to increase program memory?
how to optimize program memory?
using external program memory,is it a remedy?
please help me, thanks in advance
 

Some memory optimization tricks-

First of all write the state machine and try to figure out the maxmum total number of variables comes in states

1) Remove all unnecessary variables.
2) remove the campare steps ( if else) using bool varaibles.
3) use precomutation / #define at the places that requires multiple assigment of the same expression
4) Reuse of varible at the maxmum
5) try to reduce the loop if you are using / less array usage
6) Allocat the memory banks manually / rather than telling compiler to allocate it

Good Luck
 

thank u.
can u suggest any method to increase program memory other than these optimization technique?
 

I think proper bank allocation is one way..... or you can think of external memory or use EEPROM for storing some variables
 

Hi,

Moving to a 18F4620 which is virutally pin and code compatible and has twice the memory plus extra features over the old 452.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top