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

write directly in ROM

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



Joined: 28 Aug 2007
Posts: 45

View user's profile Send private message

write directly in ROM
PostPosted: Tue Sep 11, 2007 4:34 am     Reply with quote

write in ROM:
I want to put a variable in the ROM in every perform the program and when becom restart the PIC this variable available in the PIC.
may I write this program ?
can you help me?
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Tue Sep 11, 2007 5:48 am     Reply with quote

Writing data to the (flash) ROM on every program startup is not a good idea because of the limited erase cycles you can do before the chip breaks down (chip type dependend). Much better to use the EEPROM.
Check the manual for the read_eeprom() and write_eeprom() functions.
An example program can be found in the example directory of the compiler: ex_intee.c
ROBOTICAR



Joined: 28 Aug 2007
Posts: 45

View user's profile Send private message

PostPosted: Tue Sep 11, 2007 10:14 am     Reply with quote

Thanks for relpy

So,How can I save the "int32" variable in the EEPROM and read it?
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