View previous topic :: View next topic |
Author |
Message |
nmeyer
Joined: 09 Jul 2004 Posts: 70
|
V. 4.078 eeprom write issue? |
Posted: Tue Aug 26, 2008 8:09 pm |
|
|
I just upgraded to V. 4.078 from V4.050. I have a program that i am writing for a PIC18F8722 that i write to eeprom using the write_eeprom() function. When i used the V4.05, it worked fine. Now that i am using V4.078 it looks as if the eeprom is not being written to properly. Does anyone know of issues with this version? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Aug 26, 2008 8:39 pm |
|
|
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
|
|
Posted: Wed Aug 27, 2008 7:39 am |
|
|
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 |
|
|
|