View previous topic :: View next topic |
Author |
Message |
schulle Guest
|
place presets in internal Eeprom |
Posted: Fri Mar 17, 2006 9:23 am |
|
|
I want to place presets in the internal eeprom which I can access later on with read_eeprom(), but I found nothing if i can do this and how.
I'm using 16F684.
Does anybody know howto do this? |
|
![](templates/subSilver/images/spacer.gif) |
rberek
Joined: 10 Jan 2005 Posts: 207 Location: Ottawa, Canada
|
|
Posted: Fri Mar 17, 2006 9:48 am |
|
|
write_eeprom(address,data) |
|
![](templates/subSilver/images/spacer.gif) |
mpfj
Joined: 09 Sep 2003 Posts: 95 Location: UK
|
|
Posted: Fri Mar 17, 2006 9:48 am |
|
|
MPLAB allows you to preset the EEPROM when programming devices.
Or you can preset the locations yourself on boot up by checking for a known "magic" value at a known EEPROM location. If the "magic" value exists, you know that the EEPOMR has already been preset. If no magic value is found, you can load the EEPOMR using write_eeprom().
There are several other threads covering this, so do a search for EEPROM. |
|
![](templates/subSilver/images/spacer.gif) |
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Fri Mar 17, 2006 12:15 pm |
|
|
You can also use the #ROM directive. |
|
![](templates/subSilver/images/spacer.gif) |
schulle
Joined: 17 Mar 2006 Posts: 1
|
|
Posted: Fri Mar 17, 2006 4:54 pm |
|
|
I just found out #ROM 0x2100 works fine! |
|
![](templates/subSilver/images/spacer.gif) |
|