4.3 Accessing Advanced Code Security Configuration Bits Through MPLAB X
The ICSPDIS and SAFLOCK Configuration Bits of an 8-bit PIC microcontroller can be accessed through MPLAB X IDE. MPLAB X IDE provides a provision to read these Configuration Bits, and it is also capable of generating the #pragma directives that need to be included in the application firmware to configure these Configuration Bits on the microcontroller.
In MPLAB X IDE, the Configuration Bits window features a drop-down menu for selecting a memory section from the available memory sections of the microcontroller, as shown in the Configuration Bits Window figure.

Since the ICSPDIS and the SAFLOCK Configuration Bits are OTP, they are listed in the “OTP Fuses” section of the Configuration Bits window.

- In MPLAB X IDE, to open the configuration settings window of a connected external programmer and debugger tool, navigate to Project > Properties > Conf, and select the connected programmer and debugger tool.
- The OTP Fuses configuration settings option is not available in MPLAB X when using the PIC18F56Q24 Curiosity Nano evaluation kit. For more information, refer to the Device Configuration Protection section of the PIC18F56Q24 Curiosity Nano User Guide.