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

Setting EEPROM problem

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



Joined: 10 Apr 2006
Posts: 22

View user's profile Send private message

Setting EEPROM problem
PostPosted: Mon Apr 17, 2006 6:13 pm     Reply with quote

Hello,
i am using a pic16f914 and am setting values into eeprom thru view/eeprom then i set the values i want in the addresses needed. Upon powering up my circuit the values seem to be other than what i stored before compilation, however once i set the values in my project when PIC is running they are stored correctly and it works fine. I am storing the values of 00 from adress 00 to 0f. What could be causing the eeprom to store data other than the zeros i set there.

Thanks in advance!

Pedro

Code:

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES INTRC                    //Internal RC Osc
#FUSES PUT                        //Power Up Timer
#FUSES NOPROTECT                //Code not protected from reading
#FUSES MCLR                     //Master Clear pin enabled
#FUSES NOCPD                    //No EE protection
#FUSES BROWNOUT                   //Brownout reset
#FUSES NOIESO                   //Internal External Switch Over mode disabled
#FUSES NOFCMEN                  //Fail-safe clock monitor disabled
#FUSES NODEBUG                  //No Debug mode for ICD
#use delay(clock=4000000)
#int_timer0


Code:

   timeron = read_eeprom(0x0a);//10
   closeonrelease = read_eeprom(0x0c);//12
   fastopen = read_eeprom(0x0d);//13
   fastclose = read_eeprom(0x0e);//14
   autospeed = read_eeprom(0x0f);//15
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Apr 17, 2006 7:34 pm     Reply with quote

Quote:
I am using a pic16f914 and am setting values into eeprom thru view/eeprom

Normally, you initialize Data EEPROM with a #ROM statement.
Here's an example for the 16F-series PICs. Try this example:
http://www.ccsinfo.com/forum/viewtopic.php?t=19607&start=1
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