3 Programming Steps
The following sequence lists the programming steps with a brief explanation of each step. More detailed information about these steps is available in the subsequent sections.
- Connect the target device. To ensure successful programming, all required pins must be connected to appropriate signals. See Connecting to the Device for more information.
- Place the target device in
programming mode. For Two-Wire programming methods, the target device must be
placed in a special programming mode (Enhanced ICSP™) before
executing any other steps.Note: For the Four-Wire programming methods, step 2 is not applicable.
See Entering Two-Wire Enhanced ICSP Mode for more information.
- Check the status of the device. Checks the status of the device to ensure it is ready to receive information from the programmer. See Check Device Status for more information.
-
Erase the target device. If the target memory block in the device is not blank, or if the device is code-protected, an erase step must be performed before programming any new data. See Erasing the Device for more information.
-
Enter programming mode. Verifies that the device is not code-protected and boots the TAP controller to start sending and receiving data to and from the PIC32 CPU. See Entering Serial Execution Mode for more information.
-
Download the Programming Executive (PE). The PE is a small block of executable code that is downloaded into the RAM of the target device. It will receive and program the actual data.Note: If the programming method being used does not require the PE, step 6 is not applicable.See Downloading the Programming Executive (PE) for more information.
-
Download the block of data to program. All methods, with or without the PE, must download the desired programming data into a block of memory in RAM. See Downloading a Data Block for more information.
-
Initiate Flash Write. After downloading each block of data into RAM, the programming sequence must be started to program it into the target device’s Flash memory. See Initiating a Flash Row Write for more information.
-
Repeat step 7 and step 8 until all data blocks are downloaded and programmed.
-
Verify the program memory. After all programming data and Configuration bits are programmed, the target device memory should be read back and verified for the matching content. See Verify Device Memory for more information.
-
Exit the Programming mode. The newly programmed data is not effective until either power is removed and reapplied to the target device or an exit programming sequence is performed. See Exiting Programming Mode for more information.