I am building a program for a PIC16F877A. It seems to be running correctly in the simulator MPLABX. I'm using about half the available program and data memory.
During programming I receive the following message:
The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0xfff
configuration memory
Debug Executive
Address: 1f00 Expected Value: 1170 Received Value: 3fff
Failed to program device
Under the simulator situation I have looked in the program memory. Address 1F00 is not used and has indeed the value 3FFF. How to proceed in finding the error?
The program is written in XC8.