MPLAB® PICkitTM 4 In-Circuit Debugger
QUICK START GUIDE
C: 10 M: 100 Y: 100 K: 20
GETTING STARTED
Install the Latest Software
1
Download the MPLAB X IDE software from www.microchip.com/mplabx and install onto your computer. The installer
automatically loads the USB drivers. Launch MPLAB X IDE.
Create, Build and Run Project
3
1. Refer to the MPLAB X IDE User's Guide or online help
for instructions to install language tools, create or
open a project, and configure project properties.
2. Check that the configuration bits in your code match
the Recommended Settings below.
3. To execute your code in Debug mode, perform a
debug run. To execute your code in Non-Debug
(release) mode, perform a run. To hold a device in
Reset after programming, use the Hold in Reset icon
in the toolbar.
Recommended Settings
Setting
Component
• OSC bits set properly
Oscillator
• Running
Power
Supplied by target
Disabled (device dependent)
WDT
Disabled
Code-Protect
Disabled
Table Read Protect
LVP
Disabled
Vdd > BOD Vdd min.
BOD
Disabled
JTAG
Must be connected
AVdd and AVss
Proper channel selected, if applicable
PGCx/PGDx
Programming
Vdd voltage levels meet programming spec
Note: See MPLAB PICkit 4 In-Circuit Debugger online help for more information.
Reserved Resources
For information on reserved resources used by the
debugger, see the MPLAB PICkit 4 In-Circuit Debugger
online help.
Connect to Target Device
2
1. Connect the MPLAB PICkit 4 to the computer
using the supplied Micro-B USB cable.
2. Attach the communications cable between the
debugger and target board.
3. Connect external power to target board.
Typical Debugger System – Device with
On-Board Debug Circuitry
Power
T
a
r
g
e
t
D
e
v
i
c
e
Target Board
Micro-B USB
from computer
Alternative Debugger System – ICE Device
Header
Device-ICE
Standard
Adapter
if needed
Power
Transition Socket
Target Board
Micro-B USB
from computer
*External target board power supply to be provided by user.
www.microchip.com/pickit4
ADDITIONAL INFORMATION
Circuitry and Connector Pinouts
Correct
Target VDD (tVDD)
VDD
XTAL
VPP/MCLR
50 kΩ
Typical
n
o
i
t
a
c
i
l
p
p
A
t
e
g
r
a
T
i
e
c
v
e
D
AVDD
AVSS
PGC
PGD
VSS
Typical cable
length is 6 inches
Connect
Pin 1 to Pin 1
2
1
5
4
3
6
7
8
Target Application PC Board
Target Circuit Design Precautions
MPLAB® PICkit 4
NMCLR
Vdd
Ground
Typical 6-Pin ICSP Pinout
Pin Target
1
2
3
4
5
6
7
8
MCLR/Vpp
Vdd Target
Vss (ground)
PGD (ICSPDAT) PGD
PGC (ICSPCLK) PGC
Do Not Connect Do Not Connect
Reserved for Future use
Reserved for Future use
Incorrect
Target VDD (tVDD)
V DD
VPP/MCLR
XTAL*
n
o
i
t
a
c
i
l
p
p
A
t
e
g
r
a
T
i
e
c
v
e
D
AVDD**
AVSS**
PGC
PGD
VSS
V
2
1
5
4
3
6
7
8
• Do not use pull-ups on PGC/PGD: they will disrupt the voltage levels, since these lines have
programmable 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 use capacitors on MCLR: they will prevent fast transitions of VPP. A 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.
Target Application PC Board
• Do not exceed recommended cable lengths: Refer to the Hardware Specification of the
MPLAB PICkit 4 online help or user's guide for cable lengths.
Pinouts for Additional Interfaces
MPLAB® PICkit 4
Debugging and Programming
Pin #
ICSP
MIPS EJTAG
Cortex® SWD
1
2
3
4
5
6
7
8
** Target device must be running with an oscillator for the debugger to function as a debugger.
*** If the device has AVdd and AVss lines, they must be connected for the debugger to operate.
Vpp/NMCLR
Vdd
GND
PGD
PGC
AUX
TDI
TMS
VIO_REF
GND
TDO
TCK
NRESET
TDI
TMS
VTG
GND
SWo
SWCLK
NRST
SWDIO
Data Stream
DGI SPI
DMCI/DGI
U(S)ART/CDC
VTG
GND
(SCK)
TX
RX
MISO
SCK
MOSI
SS
The Microchip name and logo, the Microchip logo, MPLAB and PICkit are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. All other trademarks mentioned
herein are property of their respective companies. © 2018, Microchip Technology Incorporated. All Rights Reserved. 2/18
DS50002721A
www.microchip.com/pickit4