View previous topic :: View next topic |
Author |
Message |
arrow
Joined: 17 May 2005 Posts: 213
|
Writting to EEPROM form PICC? |
Posted: Tue Dec 27, 2005 7:22 am |
|
|
Hi
Is there any way to write to internal EEPROM from the C code?
Regards
a. |
|
|
John Morley
Joined: 09 Aug 2004 Posts: 97
|
|
Posted: Tue Dec 27, 2005 8:10 am |
|
|
Hi,
Sure there is, look in the manual for the function Write_EEProm().
John _________________ John Morley |
|
|
MikeValencia
Joined: 04 Aug 2004 Posts: 238 Location: Chicago
|
|
Posted: Tue Dec 27, 2005 8:11 am |
|
|
Of course.
write_eeprom(address, 8bit_value);
also look at the FAQ to write >8-bit values:
http://www.ccsinfo.com/faq/?24 |
|
|
MikeValencia
Joined: 04 Aug 2004 Posts: 238 Location: Chicago
|
|
Posted: Tue Dec 27, 2005 8:13 am |
|
|
or did you mean to ask:
How do I pre-populate the eeprom with certain values while programming the PIC. That's possible too, but i'd have to do a search in the forum for that. I know the topic's been answered a few times before. |
|
|
arrow
Joined: 17 May 2005 Posts: 213
|
|
Posted: Tue Dec 27, 2005 8:20 am |
|
|
Hi
Thank you. Yes you are right about pre- populating the EEPROM.
From a previous thread I understand that have to use: #ROM command.
Regards
a. |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Tue Dec 27, 2005 8:27 am |
|
|
A few examples:
Code: | // Example to set words:
#ROM 0xF00000 = {1, 2, 3, 4, 5}
// Example to set bytes:
#ROM int8 0xF00000 = {1, 2, 3, 4, 5}
// Example to set a string of bytes:
#ROM 0xF00010 = {"12345"} |
|
|
|
|