Code: Select all
int a;
a = 5;
EEPROM_Write(0x0000, a);
a = EEPROM_Read(0x0000);
I wrote my own lib
Code: Select all
char EEPROM_Read(char a){
NVMREGS_bit = 1; // to eeprom
NVMADRH = 0xF0;
NVMADRL = a;
NVMCON1.B0 = 1; // RD = 1
while(NVMCON1.B0){asm NOP;}
return NVMDATL;
}
I have tried to use the built-in EEPROM Tool, to write first cell to some value, but output HEX causes error while import to Microchip IPE - "this file contanes data by outrange allowed address for PIC16F18857".
So I tried everithing what I could and dont know what to do next.