|
|
View previous topic :: View next topic |
Author |
Message |
davekelly
Joined: 04 Oct 2006 Posts: 53 Location: Berkshire, England
|
16F88 RAM Problems |
Posted: Wed Oct 04, 2006 9:20 am |
|
|
I am having a problem with the 2 different versions of CCS PCM 4.011 and 3.249
I have just purchased the PCM V4 command line compiler, having encountered some serious bugs with my Bytecraft compiler which I have used for years.
I ported my project over fine using version 4.011, which compiles with the following memory usage
ROM used: 1528 words (40%)
Largest free fragment is 1792
RAM used: 135 (38%) at main() level
162 (45%) worst case
Stack: 2 locations
Reading through the forums, I was put off a little by the warnings about v4 being production stable yet, so I decided to install and compile with V3. However with no changes to the source code, I end up running out of RAM. I use a few int16 arrays, which I reduced the size of to get it to compile, and I get the following memory stats:
ROM used: 1406 words (37%)
Largest free fragment is 1792
RAM used: 133 (76%) at main() level
160 (92%) worst case
Stack: 2 locations
This seems to indicate that the info for the amount of RAM available is incorrect for the v3.249 version. Is there something else that needs to be changed?
I have both versions installed, with different paths.
I am using MPLAB 7.42 as the IDE and to launch the compiler.
My device settings are as follows:
Code: |
#include <16F88.h>
#device ADC=10
#device ICD=TRUE // Microchip ICD2
|
Thanks |
|
|
Ttelmah Guest
|
|
Posted: Wed Oct 04, 2006 9:23 am |
|
|
#device *=16
This is the default in V4, but in V3, you have to set it manually. Without this, the extra code to allow bank switching of the RAM pages is not generated, giving smaller and faster code, but limiting you to the RAM in the first bank.
Best Wishes |
|
|
davekelly
Joined: 04 Oct 2006 Posts: 53 Location: Berkshire, England
|
|
Posted: Wed Oct 04, 2006 9:25 am |
|
|
Thankyou.
I had already tried this earlier, but had a space between the = and 16, and got an error.
The CHM manual which installed is the one for V4 so I didn't look it up.
It works correctly now, thanks. |
|
|
|
|
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
|