I use MPLABX + XC8 with Proteus to simulate PIC designs.
It usually works fine...but I recently tried to use a 12F683 part and I get an MPLABX message "ERROR writing to CONFIG_MEM".
I think the problem is this: MPLABX creates a configuration word of 0xFF94 (for my desired operation) which it writes to the processor program memory at address 2007. But for some reason the Proteus 12F683 model won't allow any values above 0x3FFF for its configuration word.
I can't find any meaning for the high bits of the 12F683 configuration word in the Microchip docs, and 0x3F94 works with the Proteus model when not simulating through MPLABX.
So I'm asking one of two things:
- Has anybody figured out how to use MPLABX + Proteus to simulate a PIC 12F683 (or 12F675 or 12F1840, which have the same problem); OR...
- Does anybody know the correct pragma or instruction to have my program code write "0x3F94" to program memory location "2007" instead of the "0xFF94" that MPLABX writes using its #pragma config directives?