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

V. 4.078 eeprom write issue?

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



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Aug 26, 2008 8:39 pm     Reply with quote

Try this test program and see if it works:
Code:
#include <18F8722.h>
#fuses XT, NOWDT, BROWNOUT, PUT, NOLVP
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)

// These eeprom locations will be written when the
// PIC is programmed with the ICD2 programmer.
#rom int8 0xF00000 = {0, 1, 2, 3, 4}  // 0xF00000 is for 18F PICs

//==========================
main()
{
int8 i;

printf("Start\n\r\n\r");

// Display eeprom that was written with the ICD2.
printf("Eeprom written by the ICD2 programmer:\n\r");
for(i = 0; i < 5; i++)
    printf("%x " read_eeprom(i));
printf("\n\r");
printf("\n\r");

// Write the first two bytes with 0x55 and 0xAA.
write_eeprom(0, 0x55);
write_eeprom(1, 0xAA);


printf("Locations 0 and 1 should now be 0x55 and 0xAA:\n\r");
for(i = 0; i < 5; i++)
    printf("%x " read_eeprom(i));

printf("\n\r\n\rDone\n\r");

while(1);
 
}
nmeyer



Joined: 09 Jul 2004
Posts: 70

View user's profile Send private message

PostPosted: Wed Aug 27, 2008 7:39 am     Reply with quote

I was able to get it working. I forgot that i had an include file that was in the Devices folder that i had modifed and did not rename. Therefore when i loaded the new version, it overwrote the modified version. I have since renamed it and changed it and i am up an running agian.

Thanks
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