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

PIC18F458 eeprom write problem

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



Joined: 23 Jan 2004
Posts: 1

View user's profile Send private message

PIC18F458 eeprom write problem
PostPosted: Fri Jan 23, 2004 3:48 pm     Reply with quote

hi!

Since yesterday, I'm trying to write ONE byte into the PIC18F458 eeprom... first, I used MPLAB v6.40 and High-Tech v8.30 "C" compiler. When I simulate my program witch MPLAB, it works: the data is written where I want in the eeprom. But, when I burn it into the chip, wait for the write an read it, the eeprom is still blank! (0xFF everywhere...)

I tried to code my program in ASM.. the simulating works but the "real" eeprom is still blank again..
Is aybody knows what could be my problem???
Thanks!

Here is my code in ASM:

org 0x00;
goto Write;

Write
MOVLW 0x00;
MOVWF EEADR;
MOVLW 0x77;
MOVWF EEDATA;

BCF EECON1,EEPGD;
BCF EECON1,CFGS;
BSF EECON1,WREN;

MOVLW 0x55;
MOVWF EECON2;
MOVLW 0x0AA;
MOVWF EECON2;

BSF EECON1,WR;

Write2
BTFSC EECON1,WR;
GOTO Write2;
BCF EECON1,WREN;
BCF PIR2,EEIF;

END

;//An "equates's" file is included for the registers's and bytes adresses..
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Fri Jan 23, 2004 3:55 pm     Reply with quote

Does HiTech have a forum like this where I can ask a peer for assistance?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jan 23, 2004 4:08 pm     Reply with quote

http://www.htsoft.com/forum/all/postlist.php?Cat=&Board=pic
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