Note the following details of the code protection feature on Microchip devices:
•Microchip products meet the specification contained in their particular Microchip Data Sheet.
•Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
•There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
•Microchip is willing to work with the customer who is concerned about the integrity of their code.
•Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device
applications and t he lik e is provided only for your convenience
and may be su perseded by upda t es . It is y our 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 supp ort and/or safety ap plications is entir ely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless M icrochip from any and all dama ges, claims,
suits, or expenses re sulting from such use. No licens es are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, Accuron,
dsPIC, K
EELOQ, KEELOQ logo, MPLAB, PIC, PICmicro,
PICSTART, rfPIC, SmartShunt and UNI/O are registered
trademarks of Microchip Tec hnology Incorporated in the
U.S.A. and other countries.
FilterLab, Linear Active Thermistor, MXDEV, MXLAB,
SEEVAL, SmartSensor and The Embedded Control Solutions
Company are registered trademarks of Microchip Technology
Incorporated in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, CodeGuard,
dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN,
ECONOMONITOR, FanSense, In-Circuit Serial
Programmin g , IC SP, ICE P I C , M in d i , MiWi, MPASM, MPLAB
Certified logo, MPLIB, MPLINK, mTouch, PICkit, PICDEM,
PICDEM.net, PICtail, PIC
32
logo, PowerCal, PowerInfo,
PowerMate, PowerT ool, REAL ICE, rfLAB, Select Mode, Total
Endurance, WiperLock and ZENA are trademarks of
Microchip Technology In corporated in the U.S.A. and other
countries.
SQTP is a service mark of Microchip Technology Incorporated
in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
Microchip received ISO/TS-16949:2002 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures
are for its PIC
devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchip’s quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.
All documentation becomes dated, and this manual is no exception. Microchip tools and
documentation are constantly evolving to meet customer needs, so some actual dialogs
and/or tool descriptions may differ from those in this document. Please refer to our web site
(www.microchip.com) to obtain the latest documentation available.
Documents are identified with a “DS” number. This number is located on the bottom of each
page, in front of the p age number. The numbering convention for the DS number is
“DSXXXXXA”, where “XXXXX” is the document number and “A” is the revision level of the
document.
For the most up-to-date information on development tools, see the MPLAB
Select the Help menu, and then Topics to open a list of available on-line help files.
®
IDE on-line help.
INTRODUCTION
This chapter contains general information that will be useful to know before using
PICkit™ 3 programmer/debugger. Items discussed include:
• Document Layout
• Conventions Used in this Guide
• Warranty Registration
• Recommended Reading
• The Microchip Web Site
• Development Systems Customer Change Notification Service
This document describes how to use the PICkit 2as a development tool to emulate and
debug firmware on a target board. The manual layout is as follows:
• Chapter 1. Overvi ew – An overview of the PICkit 3 programmer/debugger.
• Chapter 2. Theory of Operation – A simplified description of how the PICkit 3
programmer/debugger works .
• Chapter 3. Ins tallation – How to install the PICkit 3 programmer/debugger.
• Chapter 4. General Setup – Provides Instructions on how to get started using the
PICkit 3 programmer/debugger to program supported devices.
• Chapter 5. PICkit 3 Debug Express – Provides basic information on using the
PICkit™ 3 Debug Express.
• Chapter 6. Troubleshooting First Steps – Begins the troubleshooting process
by identifying first steps and common reasons for problems with debugging.
• Chapter 7. Frequently Asked Questions (FAQs) – Provides information on
solving common problems.
• Chapter 8. Error Messa ges – Provides specific error messages and general
corrective actions.
• Chapter 9. Debugger Function Summary – Summarizes the available
debugging functions.
• Chapter 10. Hardware Specification – Details hardware and electrical
specifications for the PICkit 3.
• Appendix A. PICkit 3 Schematics – Provides hardwar e sc hem atic dia gr ams for
the PICkit 3 programmer/debugger.
• Appendix B. Operational Advisory – Addresses operational issues to be
considered when designing applications.
Please complete the enclosed Warranty Registration Card and mail it promptly.
Sending in the Warranty Registration Card entitles users to receive new product
updates. Interim software releases are available at the Microchip web site.
RECOMMENDED READING
This user's guide describes how to use PICkit 2. Other useful documents are listed
below. The following Microchip documents are available and recommended as
supplemental reference resources.
44-Pin Demo Board User’s Guide (DS41296)
Consult this document for instructions on how to use the 44-Pin demo board as a
development tool to emulate and debug firmware on a target board.
Low Pin Count Demo Board User’s Guide (DS51556)
Consult this document for instructions on how to use Microchip Technology’s low pin
count device (8-pin, 14-pin and 20-pin). This document includes a series of tutorials.
MPLAB
Consult this document for more information pertaining to the installation and features
of the MPLAB Integrated Development Environment (IDE) software. An on-line Help
version is also available.
In-Circuit Serial Programmer ™ (ICSP ™) Guid e (DS3 0277 )
This document contains helpful design guidelines for successful ICSP programming. It
includes application notes on hardware designs and the ICSP programming
specifications.
Describes how to use the Microchip PIC
(MPLINK linker), and librarian (MPLIB librarian).
README for PICkit™ 3 Debug Express
For the latest information on using the PICkit 3 Debug Express, read the “Readme for
PICkit 3.htm” file (an HTML file) in the Readmes subdirectory of the MPLAB IDE
installation directory . The Readme file contains updated information and known issues
that may not be included in this user’s guide.
PICkit™ 3 Debug Express C18 Lessons
These tutorials guide you through using the PICkit 3 Debug Express with the MPLAB
C Compiler for PIC18 MCU’s. They are available on the MPLAB IDE CDROM and on
the Microchip web site.
Readme Files
For the latest information on using other tools, read the tool-specific Readme files in
the Readmes subdirectory of the MPLAB IDE installation directory. The Readme files
contain updated information and known issues that may not be included in this user’s
guide.
Microchip provides online support via our web site at www.microchip.com. This web
site is used as a means to make files and information easily available to customers.
Accessible by using your favorite internet browser, the web site contains the following
information:
• Product Support – Data sheets and errata, application notes and sample
programs, design resources, user’s guides and hardware support documents,
latest software releases and archived software
• General Technical Support – Frequently Asked Questions (FAQs), technical
support requests, online discussion groups, Microchip consultant program
member listing
• Business of Microchip – Product selector and ordering guides, latest Microchip
press releases, listing of seminars and events, listings of Microchip sales offices,
distributors and factory representatives
DEVELOPMENT SYSTEMS CUSTOMER CHANGE NOTIFICATION SERVICE
Microchip’s customer notification service helps keep customers current on Microchip
products. Subscribers will receive e-mail notification whenever there are changes,
updates, revisions or errata related to a specified product family or development tool of
interest.
To register, access the Microchip web site at www.microchip.com
Change Notification and follow the registration instructions.
The Development Systems product group categories are:
• Compilers – The latest info rmatio n on Microc hip C comp ilers, as semblers , linker s
and other language tools. These include all MPLAB C compilers; all MPLAB
assemblers (including MPASM™ assembler); all MPLAB linkers (including
MPLINK™ object linker); and all MPLAB librarians (including MPLIB™ object
librarian).
• Emulators – The latest information on Microchip in-circuit emulators.These
include the MPLAB REAL ICE™, MPLAB ICE 2000 in-circuit emulators
• In-Circuit Debuggers – The latest information on the Microchip in-circuit
debuggers. These include the MPLAB ICD 2, ICD 3, PICkit™ 2 and PICkit™ 3.
• MPLAB
Integrated Development Environment for development systems tools. This list is
focused on the MPLAB IDE, MPLAB IDE Project Manager, MPLAB Editor and
MPLAB SIM simulator, as well as general editing and debugging features.
• Programmers – The latest information on Microchip programmers. These include
the MPLAB PM3 device programmer and the PICSTART
PICkit 3 developm ent pr ogr am mers .
®
IDE – The latest information on Microchip MPLAB IDE, the Windows®
Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Technical Support
Customers should contact their distributor, representative or field application engineer
(FAE) for support. Local sales offices are also available to help customers. A listing of
sales offices and locations is included in the back of this document. See our web site
for a complete, up-to-date listing of sales offices.
Technical support is available through the web site at: http://support.microchip.com
An overview of the PICkit 3 programmer/debugger system is given.
• PICkit 3 Progra mmer/Debugger Defined
• How the PICkit 3 Programmer/Debugger Helps You
• PICkit 3 Progra mme r/D ebugger Components
• Device and Feature Support
1.2PICKIT 3 PROGRAMMER/DEBUGGER DEFINED
The PICkit 3 programmer/debugger (see Figure 1-1) is a simple, low-cost in-circuit
debugger that is controlled by a PC running MPLAB IDE (v8.20 or greater) software on
a Windows
development engineer’s toolsuite. The application usage can vary from software
development to hardware integration.
The PICkit 3 programmer/debugger is a debugger system used for hardware and
software development of Microchip PIC
Signal Controllers (DSCs) that are based on In-Circuit Serial Programming™ (ICSP™)
and Enhanced In-Circuit Serial Programming 2-wire serial interfaces. In addition to
debugger functions, the PICkit 3 programmer/debugger system also may be used as a
development programmer.
The debugger system executes code like an actual device because it uses a device
with built-in emulation circuitry, instead of a special debugger chip, for emulation. All
available features of a given device are accessible interactively, and can be set and
modified by the MPLAB IDE interface.
The PICkit 3 debugger was developed for emulating embedded processors with debug
facilities. The PICkit 3 features include:
• Full-speed USB support using Windows standard drivers
• Real-time execution
• Processors run at maximum speeds
• Built-in over-voltage/short circuit monitor
• Low voltage to 5V (1.8-5V range)
• Diagnostic LEDs (power, active, status)
• Read/write program and data memory of microcontroller
• Erase of all memory types (EEPROM, ID, configuration and program) with
verification
• Peripheral freeze at breakpoint
®
platform. The PICkit 3 programmer/debugger is an integral part of the
®
microcontrollers (MCUs) and dsPIC® Digital
Note:The PICkit 3 is intended for development programming. For production
programming, please consider the MPLAB PM3 device programmer or
other third party programmers designed for a production environment.
Table 1-1 and Table 1-2 show the support for devices and device features.
TABLE 1-1:16-BIT (DATA MEMORY) DEVICES
Feature
Reset application
Run, HaltCCC
Single step
AnimateCCC
Full-speed emulationCCC
Hardware breakpoints
Peripheral freeze
Break on data fetch or writeCCC
Break on stack overflow
Stopwatch
Pass counterCCC
WDT overflow
Standard speed communication
Processor PakFFN
Legend:
C = Current support
D = Support dependent on device
F = No support now, but planned in the future
N = Support not available
Note 1: Current Switch Mode Power Supply (SMPS) devices: dsPIC30F1010/2020/2023.
2: This feature operates differently depending on the selected device.
Reset applicationCCC
Run, HaltCCC
Single step
AnimateCCC
Full-speed emulatio nCCC
Hardware breakpoints
Peripheral freeze
Break on data fetch or writeCCN
Break on stack overflow
StopwatchCNN
Pass counterCCN
WDT overflow
Standard speed communication
Processor PakFFF
Legend:
C = Current support
F = No support now, but planned in the future
N = Support not available
Note 1: This feature operates differently depending on the selected device.
A simplified description of how the PICkit 3 programmer/debugger system works is
provided here. It is intended to provide enough information so a target board can be
designed that is compatible with the debugger for both emulation and programming
operations. The basic theory of in-circuit emulation and programming is described so
that problems, if encountered, are quickly resolved.
• PICkit 3 vs. PICkit 2
• Debugger to Target Communication
• Communication Connection s
• Debugging
• Requirements for Debugging
• Programming
• Resources Used by the Debugger
2.2PICkit 3 VS. PICkit 2
The PICkit 3 programmer/debugger system is similar in function to the PICkit 2
in-circuit debugger system. Similarities of the two debuggers include:
• Powered via USB cable to PC
• Provides a programmable voltage power supply
The PICkit 3 differs from the PICkit 2 by providing:
• Extended EE program image space (512 Kbytes)
• True voltage reference
• Increased voltage range (1.8-5V V
PICkit™ 3 USER’S GUIDE
DD; 1.8-14V VPP)
2.3DEBUGGER TO TARGET COMMUNICATION
The debugger system configurations are discussed in the following sections.
CAUTION
Do not change hardware connections while the PICkit 3 or target is powered.
Standard ICSP Device Communication
The debugger system can be configured to use standard ICSP communication for both
programming and debugging functions. This 6-pin connection is the same one used by
the PICkit 2 programmer/debugger.
The modular cable can be either (1) inserted into a matching socket at the target, where
the target device is on the target board (Figure 2-1), or (2) inserted into a standard
adapter/header board combo (available as a Processor Pak), which in then plugged
into the target board (Figure 2-2).
Note:Older header boards used a 6-pin (RJ-11) connector instead of an 8-pin
connector, so these headers may be connected to the debugger with the
AC164110 ICSP adapter.
For more on standard communication, see Chapter 10. “Hardware Specification”.
2.4.1.2USING AN ADAPTER
Use the AC164110 adapter between the PICkit 3 programmer/debugger and the target
device with the modular interface (six conductor) cable. The pin numbering for the
connector is shown from the bottom of the target PC board in Figure 2-3.
Theory of Operation
Note:Cable connections at the debugger and target are mirror images of each
other, i.e., pin 1 on one end of the cable is connected to pin 6 on the other
end of the cable. See Section 10.6.2.3 “Modular Cable Specification”.
FIGURE 2-3:STANDARD RJ-11 CONNECTION AT TARGET
2.4.2Target Connection Circuitry
Figure 2-4 shows the interconnections of the PICkit 3 programmer/debugger to the
connector on the target board. The diagram also shows the wiring from the connector
to a device on the target PC board. A pull-up resistor (usually around 10 kΩ) is
recommended to be connected from the V
strobed low to reset the device.
In the following descriptions, only three lines are active and relevant to core debugger
operation: pins 1 ( V
shown on Figure 2-4 for completeness. PICkit 3 has two configurations for powering
the target device: internal debugger and external target power.
The recommended source of power is external and derived from the target application.
In this configuration, target V
the target low voltage operation. If the debugger does not sense voltage on its V
(pin 2 of the interface connector), it will not operate.
PP/MCLR), 5 (PGC) and 4 (PGD). Pins 2 (VDD) and 3 (VSS) are
DD is sensed by the debugger to allow level translation for
DD line
2.4.4Debugger Powered
The internal debugger power is limited to 30 mA. This may be of benefit for very small
applications that have the device V
for independent programming, but is not recommended for general usage as it imposes
more current demands from the USB power system derived from the PC.
Not all devices have the AV
DD and AVSS lines, but if they are present on the target
device, all must be connected to the appropriate levels in order for the debugger to
operate. They cannot be left floating.
In general, it is recommended that all V
the appropriate levels. Also, devices with a V
be connected to the appropriate capacitor or level.
Note:The interconnection is very simple. Any problems experienced are often
caused by other connections or components on these critical lines that
interfere with the operation of the PICkit 3 programmer/debugger, as
discussed in the following section.
DD separated from the rest of the application circuit
DD/AVDD and VSS/AVSS lines be connected to
CAP line (PIC18FXXJ for example) should
Theory of Operation
No!
No!
No!
No!
VPP/MCLR
PGC
PGD
1
5
4
Interface
Connector
2.4.5Circuits That Will Prevent the Debugger From Functioning
Figure 2-5 shows the active debugger lines with some components that will prevent the
PICkit 3 debugge r sys tem fro m func tio nin g.
FIGURE 2-5:IMPROPER CIRCUIT COMPONENTS
Specifically, these guidelines must be followed:
• Do not use pull-ups on PGC/PGD – they will disrupt the voltage levels, since
these lines have 4.7 kΩ pull-down resistors in the debugger.
• Do not use capacitors on PGC/PGD – they will prevent fast transitions on data
and clock lines during programming and debug communications.
• Do not us e capacitors on MCLR
simple pull-up resistor is generally sufficient.
• Do not use diodes on PGC/PGD – they will prevent bidirectional communication
between the debugger and the target device.
– they will prevent fast transitions of VPP. A
2.5DEBUGGING
There are two steps to using the PICkit 3 programmer/debugger system as a debugger.
The first requires that an application be programmed into the target device (usually with
the PICkit 3 itself). The second uses the internal in-circuit debug hardware of the target
Flash device to run and test the application program. These two steps are directly
related to the MPLAB IDE operations :
1. Program the code into the target and activate special debug functions (see the
next section for details).
2. Use the debugger to set breakpoints and run.
If the target device cannot be programmed correctly, the PICkit 3
programmer/debugger will not be able to debug.
Figure 2-6 shows the basic interconnections required for programming. Note that this
is the same as Figure 2-4, but for the sake of clarity, the V
debugger are not shown.
A simplified diagram of some of the internal interface circuitry of the PICkit 3
programmer/debugger is shown. For programming, no clock is needed on the target
device, but power must be supplied. When programming, the debugger puts
programming levels on V
PGD. To verify that the part has been programmed correctly, clocks are sent to PGC
and data is read back from PGD. This conforms to the ICSP protocol of the device
under development.
PP/MCLR, sends clock pulses on PGC and serial data via
2.6REQUIREMENTS FOR DEBUGGING
T o debug (set breakpoints, see registers, etc.) with the PICkit 3 programmer/debugger
system, there are critical elements that must be working correctly:
• The debugger must be connected to a PC. It must be powered by the PC via the
USB cable, and it must be communicating with the MPLAB IDE software via the
USB cable. See Chapter 3. “Installation” for details.
• The debugger must be connected as shown to the V
target device with the modular interface cable (or equivalent). V
also required to be connected between the debugger and target device.
• The target device must have power and a functional, running oscillator. If the
target device does not run, for any reason, the PICkit 3 programmer/debugger
cannot debug.
• The target device must have its configuration words programmed correctly:
- The oscillator Configuration bits should correspond to RC, XT , etc., depending
upon the target design.
- For some devices, the Watchdog Timer is enabled by default and needs to be
disabled.
- The target device must not have code protection enabled.
- The target device must not have table read protection enabled.
• LVP should be disabled.
Once the above conditions are met, you may proceed to the following:
Given that the requirements for debugging (see previous section) are met, these
actions can be performed when the PICkit 3 programmer/debugger is set as the current
debugger from the MPLAB IDE menu (Debugger>Select Tool>PICkit 3
• The application code is compiled/assembled by selecting Project>Build
Configuration>Debug.
• When Debugger>Program
is selected, the application code is programmed into
the device’s memory via the ICSP protocol as described above.
• A small “debug executive” program is loaded into the high area of program
memory of the target device automatically by MPLAB IDE. Since the debug
executive must reside in program memory, the application program must not use
this reserved space. Some devices have special memory areas dedicated to the
debug executive. Check your device data sheet for details.
• Special “in-circuit debug” registers in the target device are enabled. These allow
the debug executive to be activated by the debugger.
• The target device is held in reset by keeping the V
PP/MCLR line low.
2.6.2Debugging Details
Figure 2-7 illustrates the PICkit 3 programmer/debugger system when it is ready for
debugging.
):
FIGURE 2-7:PICkit™ 3 DEBUGGER READY FOR DEBUGGING
Typically , in order to find out if an application program will run correctly, a breakpoint is
set early in the program code. When a breakpoint is set from the user interface of
MPLAB IDE, the address of the breakpoint is stored in the special internal debug
registers of the target device. Commands on PGC and PGD communicate directly to
these registers to set the breakpoint address.
Next, the Debugger>Run
from MPLAB IDE. The debugger will then tell the debug executive to run. The target
will start from the reset vector and execute until the Program Counter reaches the
breakpoint address previously stored in the internal debug registers.
After the instruction at the breakpoint address is executed, the in-circuit debug
mechanism of the target device “fires” and transfers the device’s Program Counter to
the debug executive (much like an interrupt) and the user’s application is effectively
function or the Run icon (forward arrow) is usually pressed
halted. The debugger communicates with the debug executive via PGC and PGD, gets
the breakpoint status information and sends it back to MPLAB IDE. MPLAB IDE then
sends a series of queries to the debugger to get information about the target device,
such as file register contents and the state of the CPU. These queries are ultimately
performed by the debug executive.
The debug executive runs just like an application in program memory. It uses some
locations on the stack for its temporary variables. If the device does not run, for
whatever reason, such as no oscillator, a faulty power supply connection, shorts on the
target board, etc., then the debug executive cannot communicate to the PICkit 3
programmer/debugger and MPLAB IDE will issue an error message.
Another way to get a breakpoint is to press the MPLAB IDE’s Halt button (the “pause”
symbol to the right of the Run arrow). This toggles the PGC and PGD lines so that the
in-circuit debug mechanism of the target device switches the Program Counter from the
user’s code in program memory to the debug executive. Again, the target application
program is effectively halted, and MPLAB IDE uses the debugger communications with
the debug executive to interrogate the state of the target device.
2.7PROGRAMMING
Use the PICkit 3 programmer/debugger as a programmer to program an actual (non
-ICE/-ICD) device, i.e., a device not on a header board. Select “PICkit 3” from
Programmer>Select Programmer
the “Build Configuration” list box on the MPLAB IDE toolbar set to “Release”. Also, it
may be set by se lecting Project>Build Configuration>Release
All debug features are turned off or removed when the debugger is used as a
programmer. When using the Programmer>Program
MPLAB IDE will disable the in-circuit debug registers so the PICkit 3
programmer/debugger will program only the target application code and the
Configuration bits (and EEPROM data, if available and selected) into the target device.
The debug executive will not be loaded. As a programmer, the debugger can only
toggle the MCLR
register contents cannot be seen or altered.
The PICkit 3 programmer/debugger system programs the target using ICSP . V
and PGD lines should be connected as described previously . No clock is required while
programming, and all modes of the processor can be programmed, including code
protection, Watchdog Timer and table read protection.
line to reset and start the target. A breakpoint cannot be set, and
and compile/assemble your application code with
.
selection to program a device,
PP, PGC
2.8RESOURCES USED BY THE DEBUGGER
For a complete list of resources used by the debugger for your device, please see the
on-line help file in MPLAB IDE for the PICkit 3 programmer/debugger.
How to install the PICkit 3 programmer/debugger system is discussed.
• Installing the Software
• Connecting the Target
• Setting Up the Target Board
• Setting Up MPLAB IDE
3.2INSTALLING THE SOFTWARE
To install the MPLAB IDE software, first acquire the latest MPLAB IDE installation
executable (MPxxxxx.exe, where xxxxx represents the version of MPLAB IDE) from
either the Microchip web site (www.microchip.com) or the MPLAB IDE CD-ROM
(DS51123). Then run the executable and follow the screens to install MPLAB IDE.
Note:MPLAB IDE v8.20 or greater is required to use the PICkit 3
programmer/debugger.
PICkit™ 3 USER’S GUIDE
3.3CONNECTING THE TARGET
A connection is built-in to select the type of communication with the target. See
Section 2.3 “Debugger to Target Communication” for more details and a diagram.
1. Plug in the USB/power cable if not already connected.
2. Attach the communication cable(s) between debugger and target if using RJ11
plug or connect directly to a 6-pin inline header.
FIGURE 3-1:INSERT COMMUNICATIONS AND USB/POWER CABLES
For production devices, the debugger may be connected directly to the target board.
The device on the target board must have built-in debug circuitry in order for the
PICkit 3 programmer/debugger to perform emulation with it. Consult the device data
sheet to see if the device has the needed debug circuitry, i.e., it should have a
“Background Debugge r Enab le ” Configuration bit.
Note:In the future, devices with circuitry that support ICD may be used.
The target board must have a connector to accommodate the communications chosen
for the debugger. For connection information, see Section 2.3 “Debugger to Target
For ICE devices, an ICE header board is required. The header board contains the
hardware necessary to emulate a specific device or family of devices. For more
information on ICE headers, see the “Header Board Specification” (DS51292).
Note:In the future, ICD header boards with ICD devices (Device-ICD) may be
used.
A transition socket is used with the ICE header to connect the header to the target
board. Transition sockets are available in various styles to allow a common header to
be connected to one of the supported surface mount package styles. For more
information on transition sockets, see the “Transition Socket Specification” (DS51194).
Header board layout will be different for headers or processor extension packs. For
connection information, see Section 2.3 “Debugger to Target Communication”,
“Standard ICSP Device Communication”.
3.4.3Using an ICD Header
All Baseline and some Mid-Range PIC microcontrollers require a special –ICD device
mounted on a debug header circuit board to enable the debugging feature. For a list of
these devices and the required ICD header board part number, please see the “Header Board Specification” (DS51292). The Header Board Specification is included on the
PICkit 3 CD-ROM, and is available online at www.microchip.com.
Each ICD header board comes with the necessary –ICD device, and is used on the
target board instead of the production microcontroller. However, most header boards
have an RJ-11 debug connector which requires the AC164110 RJ-11 to ICSP adapter
kit to connect it to PICkit 3. Figure 3-2 illustrates using the AC162061 ICD Header for
the PIC18F45K20 with the AC164110 adapter kit and Low Pin Count Demo Board.
Many Mid-Range PIC microcontrollers and all PIC18 and 16-bit PIC microcontroller
devices do not require an ICD header and can be debugged directly through the ICSP
programming connections .
3.4.4Powering the Target
These are configuration essentials:
• When using the USB connection, PICkit 3 can be powered from the PC but it can
only provide a limited amount of current, up to 30 mA, at V
small target board.
• The desired method is for the target to provide V
current. The additional benefit is that plug-and-play target detection facility is
inherited, i.e., MPLAB IDE will let you know in the Output window when it has
detected the target and has detected the device.
Note:The target voltage is only used for powering up the drivers for the ICSP
interface; the target voltage does not power up the PICkit 3. The PICkit 3
power is derived strictly from the USB port.
If you have not already done so, connect the PICkit 3 to the target using the appropriate
cables (see Section 3.3 “Connecting the Target”). Then power the target. If you are
powering the target through the PICkit 3, see Section 9.5.8 “Settings Dialog, Power
Tab” for instructions.
3.5SETTING UP MPLAB IDE
Once the hardware is connected and powered, MPLAB IDE may be set up for use with
the PICkit 3 programmer/debugger.
On some devices, you must select the communications channel in the Configuration
bits, e.g., PGC1/EMUC1 and PGD1/EMUD1. Make sure the pins selected here are the
same ones physically connected to the device.
For more on setting up a project and getting started with PICkit 3, see Chapter