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

Why isn't #device 16F876 *=16 configured by default?

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



Joined: 08 Feb 2005
Posts: 1

View user's profile Send private message

Why isn't #device 16F876 *=16 configured by default?
PostPosted: Tue Feb 08, 2005 10:08 pm     Reply with quote

I just upgraded my PCM from an old version (3+ yrs old) and couldn't recompile my code because I ran out of RAM. This particular code runs on a 16F876 and typically consumes 85%+ of the available RAM, which includes an 85 byte buffer string (array).

I finally got the code to compile by changing my 16F876.h file to read:
Code:
#device PIC16F876 *=16


It seems odd that the *=16 isn't enabled by default.

Am I missing something? Is there some big gotchya to enabling the 16 bit pointers? Is there some other way to enable the 16 bit pointers other than modifying my standard include files?

Zack
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Tue Feb 08, 2005 10:14 pm     Reply with quote

Yep. Enabling the 16 bit pointers increases code size and may affect execution speed in speed critical applications which is something some people may not want .

If you had used it on the old processor from your previous project it would have used more space there and might have caused you problems too.

Just put the line #device *=16 right after the header include line in the main source code. That way you dont have to modify any header files...
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