4.1.1 Configuration of PDID Feature

To enable the PDID feature on the PIC18-Q24 family of microcontrollers, program the ICSPDIS bit of the CONFIG12 configuration register to 0.

Figure 4-1. CONFIG12 Register
Important: The ICSPDIS Configuration bit may be present in different configuration registers for other families of 8-bit PIC microcontrollers, which can be found in their respective device data sheets.

ICSPDIS is a Configuration bit that is not part of the standard executable code of the microcontroller. It can only be written to or updated during programming time. The configuration of the ICSPDIS bit can be determined through directives written in the application firmware.

For application firmware generated using MCC and MPLAB® X IDE, configure the bit in the Easy View window of the Configuration Bits module in MCC.

Once the PDID feature is enabled through the ICSPDIS Configuration bit, the ICSP interface on the microcontroller is permanently disabled. Additional steps have been implemented in MPLAB X/MCC to ensure that the ICSPDIS bit does not inadvertently or accidentally get set before the device is ready for production. To access the ICSPDIS bit configuration section, select the "Enable OTP Access Bits" option in the "One-Time Programmable (OTP) Registers" section of the Configuration Bits Easy View window, as shown in the ICSCPDIS Configuration Bit Setting in MCC figure.

Figure 4-2. ICSCPDIS Configuration Bit Setting in MCC
Tip:
  • In MCC, open the Easy View window of Configuration bits by navigating to Project Resources Management [MCC] > Project Resource > System > Configuration Bits, and click the “Configuration Bits” option, as shown in the Configuration Bits Easy View Selection in MCC figure.
    Figure 4-3. Configuration Bits Easy View Selection in MCC
  • The PDID feature can also be configured through ICSP commands using the SPI-based programming method. To enable the PDID feature through ICSP commands, follow the sequence below:

    a. Send the Program Access Enable Command with the appropriate payload.

    b. Send the Program Data Command to write to the ICSPDIS bit.

    For more information on the Program Access Enable Command and the Program Data Command, refer to the PIC18-Q24 Family Programming Specification.