Setting Up A Programmer

Setting Up A Programmer

This section focuses on setting up the programmer within the IPE.

Key Concepts

  • Supported Tools
  • Selecting Device Family and Devices
  • Selecting the Tool
  • Connecting the Tool
  • Output Window
  • Importing a HEX File
  • Exporting a HEX File

Supported Tools

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.

IPE_device_family.png

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.

IPE_device_selection.png

By clicking on the Device drop-down menu, you can now select other PIC24 devices. See figure below:

IPE_device_pic24.png

After you selected the device you wish to program, click Apply to configure the IPE to the current device. See figure below:

IPE_device_apply.png

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).

IPE_select_tool.png

Connecting the Tool

Now, click on the Connect button (next to the Tool name) to establish a connection between the IPE and the tool.

IPE_connect_tool.png

Note:
The IPE scans tools in real-time. If the IPE detects a tool that is connected to your computer, the Tool drop-down menu indicates the tool's serial number. The figure below shows that PICKit3 S.No : BUR<114183940> is connected to the computer.

IPE_tool_found.png


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.

IPE_connecting.png

After the IPE successfully connected to the tool, you'll see at the output as below showing the target device is detected.

IPE_connected.png

Note:
An exclamation point before the tool name indicates that the USB drivers need to be updated. This will not occur with the PICkit 3. However, the USB drivers may need to be updated for the MPLAB® ICD 3, MPLAB® PM3, or REAL ICE. See figure below:

IPE_tool_warning.png

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.

1

Driver Installation Instructions
Launch Start Page within MPLAB X IDE. Click on the Learn & Discover tab which is located at the far left of the Start Page. Click on MPLAB IDE v8 Users - IMPORTANT link You can now follow the instructions to install the driver.

IPE_start_page_v8_users.png
Click image to enlarge.

2

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:

32-bit OS

C:\Windows\system32\WinUSB.dll (32-bit)

C:\Windows\system32\drivers\WinUSB.sys (64-bit)

64-bit OS

C:\Windows\SysWOW64\WinUSB.dll (32-bit)

C:\Windows\system32\WinUSB.dll (64-bit)

C:\Windows\system32\drivers\WinUSB.sys (64-bit)

Note:
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.

3

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:

C:\Program Files\Microchip\MPLABX\Switcher\32Bit\winusb\x86\MCHPWinUSBDevice.inf

or

C:\Program Files\Microchip\MPLABX\Switcher\64Bit\winusb\amd64\MCHPWinUSBDevice.inf

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.

Output Window

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.

IPE_output_window.png

MPLAB® IPE allows you to import an existing HEX file to the IPE. By default, the importing HEX file feature is enabled.

1

Launch MPLAB® IPE. Click File which is located at the upper left of the IPE window. Select Import > Hex, as shown below.

IPE_import_HEX.png

2

File dialog box appears, navigate to the HEX file location (in the example below, the MPLAB®X project HEX file): _GettingStarted.X.production.hex is located at C:/MTT/TLS0101/_GettingStarted.X/dist/PIC24FJ128GA010/production. Select the HEX file, click Open.

IPE_HEX_location.png

3

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.

IPE_HEX_success.png

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.

IPE_HEX_error.png

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:

IPE_HEX_import_disabled.png

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.

1

Launch MPLAB® IPE. Click File which is located at the upper left of the IPE window. Select Export > HEX, as shown below.

IPE_HEX_export.png

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.

IPE_allow_export_setting.png

20th Annual
Microchip MASTERs Conference 2016
Register now - Deadline: July 29

JW Marriott Desert Ridge Resort-Phoenix, AZ

© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.