View previous topic :: View next topic |
Author |
Message |
SteveK
Joined: 13 Nov 2005 Posts: 4
|
bogus out of ram error |
Posted: Sun Feb 26, 2006 10:21 pm |
|
|
Hi there,
I'm using PCWH 3.241. I have a program which compiles OK for the 16F874A. It reports 41% ROM, 68-72% RAM.
If I try and compile for the 16F877 (more ram and flash), I get a "Not enough ram for all variables" message
If I look at the 16F877 in the device editor, it appears to use all the ram in the chip.
Is this a known quirk? I can post the source code - is there an option for attaching a file to these posts?
Many thanks,
Steve Krenek |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Feb 26, 2006 10:35 pm |
|
|
Add the line shown in bold below:
Quote: |
#include <16F877.H>
#device *=16
#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);
} |
|
|
|
SteveK
Joined: 13 Nov 2005 Posts: 4
|
|
Posted: Sun Feb 26, 2006 10:46 pm |
|
|
Works a treat!
Many thanks. Er... is this something that should be highlighted in the documentation somewhere?
Steve |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Feb 26, 2006 10:53 pm |
|
|
The "out of ram" question gets asked all the time on here.
CCS has the answer in the documentation, but it's buried in the FAQ:
http://www.ccsinfo.com/faq/
See item #3 in this FAQ question:
Quote: |
Memory
Why does the compiler show less RAM than there really is ?
|
|
|
|
|