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 support@ccsinfo.com

Writting to EEPROM form PICC?

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



Joined: 17 May 2005
Posts: 213

View user's profile Send private message

Writting to EEPROM form PICC?
PostPosted: Tue Dec 27, 2005 7:22 am     Reply with quote

Hi

Is there any way to write to internal EEPROM from the C code?

Regards
a.
John Morley



Joined: 09 Aug 2004
Posts: 97

View user's profile Send private message

PostPosted: Tue Dec 27, 2005 8:10 am     Reply with quote

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

View user's profile Send private message Send e-mail Yahoo Messenger

PostPosted: Tue Dec 27, 2005 8:11 am     Reply with quote

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

View user's profile Send private message Send e-mail Yahoo Messenger

PostPosted: Tue Dec 27, 2005 8:13 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Dec 27, 2005 8:20 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Dec 27, 2005 8:27 am     Reply with quote

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"}
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