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

Access RAM Memory

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



Joined: 02 Aug 2007
Posts: 31

View user's profile Send private message

Access RAM Memory
PostPosted: Thu Jan 31, 2008 9:17 am     Reply with quote

Compiler Version: 4.047
IDE Version: MPLAB IDE V7.60
Device: PIC18F2520

Does the compiler determine how much of the Access RAM Area (0x00 - 0x7F) is reserved as a scratchpad for data manipulation?

If so, how do I know how much has been reserved so I can make sure the memory is saved during my #int_global routine? Or should I continue to compile the program and view the assembly code to determine what memory area is being used?

Thanks.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jan 31, 2008 12:29 pm     Reply with quote

Here are some posts by Ttelmah in which he discusses the scratch
variables:
http://www.ccsinfo.com/forum/viewtopic.php?t=27996
http://www.ccsinfo.com/forum/viewtopic.php?t=27348
http://www.ccsinfo.com/forum/viewtopic.php?t=31785
http://www.ccsinfo.com/forum/viewtopic.php?t=28629
Fusillade



Joined: 02 Aug 2007
Posts: 31

View user's profile Send private message

PostPosted: Thu Jan 31, 2008 2:23 pm     Reply with quote

PCM programmer wrote:
Here are some posts by Ttelmah in which he discusses the scratch
variables:
http://www.ccsinfo.com/forum/viewtopic.php?t=27996
http://www.ccsinfo.com/forum/viewtopic.php?t=27348
http://www.ccsinfo.com/forum/viewtopic.php?t=31785
http://www.ccsinfo.com/forum/viewtopic.php?t=28629


So as Ttelmah wrote:

Quote:
There are two distinctly different types of scratch variable used by CCS. The first are the true 'system' scratch variables. These are located at the bottom of memory, and are global/static in nature. The location for these, can be defined from the device editor, under the 'memory' tab, and they will be located at the defined point, and grow upwards, normally occupying just five locations.


As a result, I should just concern myself with protecting the first 5 "true system" bytes of scratch memory during my interrupt routine as the other scratch variables are likely not affected.
_________________
New:

Compiler Version: 5.078
IDE Version: MPLAB X V4.15
Devices: PIC18LF****

Old:

Compiler Version: 4.121
IDE Version: MPLAB IDE V8.63
Devices: PIC18LF****
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