Quote Originally Posted by skimask View Post
I'm fairly sure that you have to shut off ALL interrupts while trying to write to eeprom or flash, not just DISABLE interrupts. You actually have to disable the global interrupt enable flag, then reenable it when the write is done.

I Tried moving the WRITE statement to the main program like this but it still does'nt write:

INTCON = %00000000 'DISABLE GLOBAL & PERIFERAL INTERRUPTS
WRITE 0, PRESET
PAUSE 10
INTCON = %11000000

Regards

Chris