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

Size of Program Memory?

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



Joined: 06 Dec 2005
Posts: 59

View user's profile Send private message

Size of Program Memory?
PostPosted: Mon Oct 06, 2008 5:39 am     Reply with quote

18F2620
PCWH v4.014

Dear,

is it possible to read the program memory size into a variable? 18F2620 has 64k, so the value that must be read is 0xFFFF into an int16 variable. I need the size for a further process and the function I have to write should be applicable for different PICs with different program memory space.

Thanks for any help!

Best Regards
nilsener
Ttelmah
Guest







PostPosted: Mon Oct 06, 2008 9:49 am     Reply with quote

Not 'read', but it is available as a defined value for you.
getenv("PROGRAM_MEMORY")

will return the size of the program memory for the current processor.

Best Wishes
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