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

Can not write in internal EEPROM PIC18F252

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







Can not write in internal EEPROM PIC18F252
PostPosted: Tue Mar 25, 2003 4:17 pm     Reply with quote

Can not write in internal EEPROM PIC18F252.
I use this code:
B1=12;
B2=24;
write_EEPROM(adr, B1) ;
write_EEPROM(adr+1, B2) ;
B1=read_EEPROM(adr);
B2=read_EEPROM(adr+1);

... and B1/B2 after read is always 0xFF :-((

Thanks for help.
___________________________
This message was ported from CCS's old forum
Original Post ID: 13063
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

Re: Can not write in internal EEPROM PIC18F252
PostPosted: Tue Mar 25, 2003 4:30 pm     Reply with quote

:=Can not write in internal EEPROM PIC18F252.
:=I use this code:
:=B1=12;
:=B2=24;
:=write_EEPROM(adr, B1) ;
:=write_EEPROM(adr+1, B2) ;
:=B1=read_EEPROM(adr);
:=B2=read_EEPROM(adr+1);
:=
:=... and B1/B2 after read is always 0xFF :-((
:=
------------------------------------------------------------

What's your version of the PCH compiler ?
Here are some lines from the old CCS versions page:

3.092 Some EEPROM write issues are resolved
3.093 Another PIC18 EEPROM issue fixed
3.104 PIC18 PROGRAM_EEPROM read/write fixed/changed -- See readme.txt
___________________________
This message was ported from CCS's old forum
Original Post ID: 13065
TSchultz



Joined: 08 Sep 2003
Posts: 66
Location: Toronto, Canada

View user's profile Send private message

RE: Can not write in internal EEPROM PIC18F252
PostPosted: Wed Mar 26, 2003 5:46 am     Reply with quote

:=Can not write in internal EEPROM PIC18F252.
:=I use this code:
:=B1=12;
:=B2=24;
:=write_EEPROM(adr, B1) ;
:=write_EEPROM(adr+1, B2) ;
:=B1=read_EEPROM(adr);
:=B2=read_EEPROM(adr+1);
:=
:=... and B1/B2 after read is always 0xFF :-((
:=
:=Thanks for help.

Make sure you have the fuses set correctly to allow writing of the EEPROM. This one caught me when I switched from the PIC16F877 to the PIC18F452. There are many more fuse settings that need to be correct for FLASH and/or EEPROM write, also the WDT is now controlled by fuse settings as well.

-Troy
___________________________
This message was ported from CCS's old forum
Original Post ID: 13078
gernot
Guest







Problem solved
PostPosted: Wed Mar 26, 2003 6:09 am     Reply with quote

Thanks for the help :-))
Fuse was the problem.
___________________________
This message was ported from CCS's old forum
Original Post ID: 13079
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