View previous topic :: View next topic |
Author |
Message |
ccmcca Guest
|
NOT ENOUGH RAM |
Posted: Mon Oct 25, 2004 12:05 pm |
|
|
What i have to do with this error?
Thanks |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Mon Oct 25, 2004 1:17 pm |
|
|
1) See how much RAM your chip has.
2) See how much RAM all your variables and data structures take.
3) Allow a little for compiler scratchpad if you are using any complex lines of code.
If it doesn't fit you need to:
1) Use a bigger chip.
2) Use fewer variables, reuse variables, use shorts instead of ints, use smaller buffers etc.
3) Use simpled C lines so the compiled doesn't need so much scratchpad. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Oct 25, 2004 2:01 pm |
|
|
And, for most chips in the 16-series, with the PCM compiler you
can enable use of all RAM with the #device *=16 statement, as
shown below:
Code: | #include <16F877.H>
#device *=16 // <== Add this line, at this exact location.
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock = 4000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)
//==================================
void main()
{
while(1);
} |
|
|
|
ccmcca Guest
|
THANKS |
Posted: Mon Oct 25, 2004 7:35 pm |
|
|
Eso era el problema amigos!!!!!!!!!!!!!!!!!!!!!!!!!!
THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
|
|
Stephanfo
Joined: 28 Nov 2004 Posts: 5
|
Thanks, soooooo much |
Posted: Sun Dec 12, 2004 2:49 pm |
|
|
Hello,
I was looking for why I was out of memory with only half of used variable.
And I found this post.
I always asked me for the interest of this option, now I know
Thanks a lot for your help
Stephanfo |
|
|
|