CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Can't access all of 16F688's RAM

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ckrusen



Joined: 09 Feb 2009
Posts: 12

View user's profile Send private message

Can't access all of 16F688's RAM
PostPosted: Wed Jul 29, 2009 10:54 am     Reply with quote

Device: PIC16F688 RAM
Compiler: CCSC PCM V3.235

The PIC16F688 has 256 bytes of RAM, and according to the datasheet the RAM occupies the spaces: $20-$7F, $90-$EF, and $120-$16F. That adds up to 256 bytes.

However, the compiler complains that I've used 100% of the RAM, while the SYM file shows no variables (declared or SCRATCH) above $EF.

How do I specify the memory space so I can use those last 80 bytes fro $120 - $16F?

Thanks in advance
_________________
Calvin
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jul 29, 2009 11:12 am     Reply with quote

Quote:

How do I specify the memory space so I can use those last 80 bytes fro $120 - $16F?

Quote:
#include <16F688.h>
#device *=16
#fuses XT, NOWDT, PUT, BROWNOUT
#use delay(clock=4000000)

Add the line shown in bold. This is for the 16F-series. It's not needed for 18F.
ckrusen



Joined: 09 Feb 2009
Posts: 12

View user's profile Send private message

PostPosted: Wed Jul 29, 2009 11:37 am     Reply with quote

PCM programmer wrote:
Quote:

How do I specify the memory space so I can use those last 80 bytes fro $120 - $16F?

Quote:
#include <16F688.h>
#device *=16
#fuses XT, NOWDT, PUT, BROWNOUT
#use delay(clock=4000000)

Add the line shown in bold. This is for the 16F-series. It's not needed for 18F.


Thanks!

It seems odd to default to excluding nearly 1/3 of the RAM.
_________________
Calvin
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jul 29, 2009 11:48 am     Reply with quote

Quote:
It seems odd to default to excluding nearly 1/3 of the RAM.

See this thread for an explanation:
http://www.ccsinfo.com/forum/viewtopic.php?t=39538
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group