Why isn't #device 16F876 *=16 configured by default?
Posted: Tue Feb 08, 2005 10:08 pm
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: 1935 Location: Norman, OK
Posted: Tue Feb 08, 2005 10:14 pm
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...
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