Setting Up A Programmer
This section focuses on setting up the programmer within the IPE.
- Supported Tools
- Selecting Device Family and Devices
- Selecting the Tool
- Connecting the Tool
- Output Window
- Importing a HEX File
- Exporting a HEX File
To program your device, make sure the programming tools are supported by the IPE. Supported tools can be found here.
Selecting Device Family and Devices
After launching the MPLAB® IPE icon from your computer desktop, click on the Family drop-down menu. You now can select the family of the device you wish to program. The figure below shows that 16-bit MCUs (PIC24) is selected.
The IPE then automatically filters the devices associated with the 16-bit PIC24 family. In the figure below, PIC24EP128GP202 is highlighted in blue as the selected device.
By clicking on the Device drop-down menu, you can now select other PIC24 devices. See figure below:
After you selected the device you wish to program, click Apply to configure the IPE to the current device. See figure below:
Selecting the Tool
The next step is to connect the development tool to your computer by attaching the appropriate target board, device, and power. For specific instructions on how to connect power to your target device, please refer to the Microchip development tools website or developer help wiki page.
Use the Tool drop-down menu to select the tool you want to use. If more than one development tool is connected to your computer, select the one you wish to use (see figure below).
Connecting the Tool
Now, click on the Connect button (next to the Tool name) to establish a connection between the IPE and the tool.
While the IPE attempts to connect to the tool, you'll see a green bar moving back and forth right above the output window indicating the IPE is connecting to the tool. At the output window, it shows messages such as downloading Firmware, bootloader, Fireware type, suite version, and so forth. The figure below shows the IPE is connecting to a ICD3.
After the IPE successfully connected to the tool, you'll see at the output as below showing the target device is detected.
For information on installing the correct USB drivers for Microsoft Windows®, you can refer to this article on manually installing drivers for REAL ICE or ICD3.
For MPLAB IDE V8 users, the steps to install the driver manually are described below.
Before You Install the Drivers
Whether you use the Switcher or activate the preinstaller to install your drivers, be aware that your system’s version of WinUSB drivers will be replaced if they are older than the Switcher or preinstaller version. If you want to keep your version of WinUSB drivers, rename these files before installing any Microchip device driver.
The WinUSB driver is located at:
If MPLAB IDE v8.xx or eariler is already installed on your computer, you will run the Switcher program to switch from MPLAB IDE v8 drivers to MPLAB X IDE drivers, which are installed the first time you switch.
The Switcher program is a GUI application called MPDDSwitch (32-bit OS) or MPDDSwitch64 (64-bit OS). This should be available as the desktop icon MPLAB Driver Switcher. USB Switcher video tutorial is available here.
Install the Drivers Manually
1. Open the Device Manager (under Control Panel). Look under “Microchip Tools” for your tool or, if you cannot find it there, under “Other Devices” for “Unknown Device”.
2. Right-click on your tool name or “Unknown Device” and select “Update Driver Software”.
3. In the Update Driver Software dialog, select “Browse my computer for driver software”.
Note: DO NOT select “Search automatically for updated driver software”. This will install the wrong device driver. If you accidentally select this, back out or exit and repeat these steps to install the correct driver.
4. Locate the correct device driver for your system. The default locations for the device drivers are:
For Windows 8 OS, the drivers are in either the x86_Windows8 or amd64_Windows8 subfolder.
5. If a Windows Security dialog pops up, select "Install this driver software anyway" to proceed to install the drivers.
When the tool is connected, any messages or errors related to this tool will be displayed in the Output window as shown below. After the tool is successfully connected, you are now able to program the device with the IPE. A video tutorial on basic device programming using IPE can be found here.
MPLAB® IPE allows you to import an existing HEX file to the IPE. By default, the importing HEX file feature is enabled.
The IPE then loads the HEX file to the IPE, in the output window, it shows
"Loading hex file. Please wait…"
"Loading code from C:\MTT\TLS0101\_GettingStarted.X\dist\PIC24FJ128GA010\production\_GettingStarted.X.production.hex…"
If the HEX file was imported successfully, the output window of the IPE will show time stamp and "Hex file loaded successfully. See figure below.
Device Selection Before Importing HEX File:
Before importing the HEX file, make sure the device which corresponds to the HEX file is selected. In the above example, the device is PIC24FJ128GA010. If a different device is selected, as in the figure below where device 11AA010 was selected, a memory address warning will occur when the IPE trys to import the HEX file.
Disabling Import HEX File Feature:
Because importing HEX file is enabled by default, to disable it you must first login to Advanced Mode. Click Production Mode option button located on the left side of the IPE window. Check off Allow Import Hex file. Click Log out to return to the Production Mode. See figure below:
MPLAB® IPE allows you to export data from the IPE to storage media. By default, these options are not available in Production Mode. However, in Advanced Mode, an authorized user can change the default states of this feature for the Production Mode.
Before exporting the Hex file, make sure the Allow Export Hex option is checked on in the Production Mode settings, as shown below. Click Log out to return to the Production Mode. To make changes to the Production Mode settings, you need to first login to Advanced Mode, refer to this Advanced mode login page for details.