How to save some ROM space using RAM space?

Status
Not open for further replies.

Mithun_K_Das

Advanced Member level 3
Joined
Apr 24, 2010
Messages
899
Helped
24
Reputation
48
Reaction score
26
Trophy points
1,318
Location
Dhaka, Bangladesh, Bangladesh
Visit site
Activity points
8,254
Can anyone tell me how can I save some ROM space using RAM space? I'm working with PIC12F675. I just need little bit extra ROM space. Can you tell me how can I save some space?

I've enough free RAM space.
 

Generally speaking, RAM can't replace ROM. If it's a C coded application, there's most likely optimization potential using assembly code in some places.
 

Try to make the code itself more efficient. Like FvM has mentioned, use assembly in some places to reduce code size. Try to avoid unnecessary "complications" in the code that may take more code space. For example, in some situation, it may be easier for you to use floating point calculation, but that's going to take much more ROM space than slightly longer (longer to you, but shorter for the microcontroller) integer calculations.

Hope this helps.
Tahmid.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…