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

place presets in internal Eeprom

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







place presets in internal Eeprom
PostPosted: Fri Mar 17, 2006 9:23 am     Reply with quote

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?
rberek



Joined: 10 Jan 2005
Posts: 207
Location: Ottawa, Canada

View user's profile Send private message

PostPosted: Fri Mar 17, 2006 9:48 am     Reply with quote

write_eeprom(address,data)
mpfj



Joined: 09 Sep 2003
Posts: 95
Location: UK

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Fri Mar 17, 2006 9:48 am     Reply with quote

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.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Fri Mar 17, 2006 12:15 pm     Reply with quote

You can also use the #ROM directive.
schulle



Joined: 17 Mar 2006
Posts: 1

View user's profile Send private message Visit poster's website

PostPosted: Fri Mar 17, 2006 4:54 pm     Reply with quote

I just found out #ROM 0x2100 works fine!
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