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

When will data EEPROM be used by compiler?

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



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

When will data EEPROM be used by compiler?
PostPosted: Thu Aug 31, 2006 9:17 am     Reply with quote

When will data EEPROM be used by compiler?
The way I understand it is that for example when I
((16F877V3.249))
#define _str_1 0x2100
#rom _str_1={"This is string1"}
This will put in data EEPROM ((right after the program FLASH)

And it is read with
address=0;
result=read_eeprom(address);//remember the offset 0x2100==0

BUT

Is there an easier way?
Does the compiler use this for anything automagically?
Using it doesn't show up in %ROM used..Right?
Ttelmah
Guest







PostPosted: Thu Aug 31, 2006 10:13 am     Reply with quote

The data EEPROM, is effectively just another peripheral, that happens to be 'built in' to many of the chips. On some of the older chips it is even accessed using the commands for external EEPROM memories, being just a 'clone' of an external EEPROM chip attached to the die. The 'programming' option, is just a convenience provided by MicroChip, who automatically 'remap' this part of the memory space as addressed by the programmer to this 'external' device. CCS,won't use the EEPROM at all. You cannot run code from it, or use it to store variables, so nothing that the compiler actually want's to do itself, can use this area. It is a _long term_ store, for values that change infrequently.

Best Wishes
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Thu Aug 31, 2006 10:52 am     Reply with quote

Great.
I want to typemod that and use it for seldom/never changing strings and non-volatile program initial values.

I am doing this because I am running out of ROM.
Boards are made.((not my design)) and I can't change PIC.
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