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

Problem Writing to eeprom PIC18F4431
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Ralph
Guest







PostPosted: Thu Oct 01, 2009 3:06 pm     Reply with quote

Hey, I'm trying in a real circuit.

I have two of the PIC18F4431 - I also checked with the other one but nothing.


So recently I added

#FUSES NOCPD //No EE protection
#FUSES NOWRTD //Data EEPROM not write protected

but still nothing!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Oct 01, 2009 3:35 pm     Reply with quote

It worked for me. I installed vs. 3.249 and programmed the code
below into an 18F4431 and ran it on a PicDem2-Plus board.
Here is the output:
Quote:

a = 02
b = 05


Here is the test program:
Code:

#include <18F4431.h>
#fuses INTRC_IO, NOWDT, BROWNOUT, PUT, NOLVP
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)

#rom 0xf00000={1,2,3,4}

//==========================
main()
{
int a;
int b;

write_eeprom(9,5);
write_eeprom(10,6);
write_eeprom(11,7);

a = read_eeprom(2);
b = read_eeprom(9);

printf("a = %x \n\r", a);
printf("b = %x \n\r", b);

while(1);
}
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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