View previous topic :: View next topic |
Author |
Message |
Wipster
Joined: 09 Oct 2008 Posts: 16
|
Initialising EEPROM with #ROM |
Posted: Fri Nov 25, 2011 4:33 pm |
|
|
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} |
|
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Nov 25, 2011 6:25 pm |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
Wipster
Joined: 09 Oct 2008 Posts: 16
|
|
Posted: Fri Nov 25, 2011 6:47 pm |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9181 Location: Greensville,Ontario
|
|
Posted: Fri Nov 25, 2011 7:09 pm |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
|