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

Initialising EEPROM with #ROM

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



Joined: 09 Oct 2008
Posts: 16

View user's profile Send private message

Initialising EEPROM with #ROM
PostPosted: Fri Nov 25, 2011 4:33 pm     Reply with quote

Hey all,
I am trying to initialise my EEPROM in my PIC (12F1840) using the code below. However, I notice that when its included the program memory usage counter in MPLAB goes up by the same amount.
So what exactly is it doing? I don't see the initialisation in the disassembly so I'm pretty confused where this extra is being counted.
I'm using MPLAB v8.80 with CCS 4.124

Code:
#ROM getenv("EEPROM_ADDRESS") = {0x01, 0x23, 0x45, 0x67, 0x89}
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Nov 25, 2011 6:25 pm     Reply with quote

Are you talking about the MPLAB "Memory Usage Gauge" ?
I think it works sometimes in some MPLAB versions, and then it doesn't
work in other versions. I don't trust that thing.

If you want to see the data eeprom, go to the MPLAB menu: View / EEPROM
Wipster



Joined: 09 Oct 2008
Posts: 16

View user's profile Send private message

PostPosted: Fri Nov 25, 2011 6:47 pm     Reply with quote

Yes sorry I did mean the "Memory Usage Gauge". I filled the EEPROM in the definition and although the Gauge went up the ROM % used didn't. I guess that confirms that then.

Possibly out of scope of this forum but worth a try.
Do you know if its possible to program the EEPROM separately after a device has been flashed, not from the flash program but with a programmer.
For instance if I get the PIC's flashed at the factory then I can throw some serials and localisation in at my end without having to recompile/flash the lot?

The only approach I have found to enable that sort of thing (untested) is to take the compiled hex and make a program to splice the EEPROM bits in that I need, is there a cleaner way?

Thanks.
temtronic



Joined: 01 Jul 2010
Posts: 9246
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Nov 25, 2011 7:09 pm     Reply with quote

You should be able to only program the eeprom area.I've used the PicstartPlus programmer and MPLAB and it allows 'selective' programming.
I've never 'played' with doing that but it seems resonable that it can be done.
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