2
QUICK START GUIDE MPLAB ® PICkit TM 4 In-Circuit Debugger GETTING STARTED Install the Latest Software 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. Connect to Target Device 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. 1 2 www.microchip.com/pickit4 Create, Build and Run Project 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 Component Setting Oscillator • OSC bits set properly • Running Power Supplied by target WDT Disabled (device dependent) Code-Protect Disabled Table Read Protect Disabled LVP Disabled BOD VDD > BOD VDD min. JTAG Disabled AVDD and AVSS Must be connected PGCx/PGDx Proper channel selected, if applicable 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. 3 *External target board power supply to be provided by user. Typical Debugger System – Device with On-Board Debug Circuitry Alternative Debugger System – ICE Device Transition Socket if needed Device-ICE Standard Adapter Header Power Micro-B USB from computer Target Board Micro-B USB from computer Target Device Power Target Board

QUICK START GUIDE - Microchip Technology · 2020. 5. 5. · 5 pgc clk tck swclk tck sck clk 6 taux aux reset reset clk dw rst 7 ttdi tdi tdi mosi 8 ttms tms swdio tms pinouts for

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

  • QUICK START GUIDEMPLAB® PICkitTM 4 In-Circuit Debugger

    GETTING STARTED

    Install the Latest Software

    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.

    Connect to Target Device

    1. Connect the MPLAB PICkit 4 to the computerusing the supplied Micro-B USB cable.

    2. Attach the communications cable between thedebugger and target board.

    3. Connect external power to target board.

    1

    2

    www.microchip.com/pickit4

    Create, Build and Run Project

    1. Refer to the MPLAB X IDE User's Guide or online helpfor instructions to install language tools, create oropen a project, and confi gure project properties.

    2. Check that the confi guration bits in your code matchthe Recommended Settings below.

    3. To execute your code in Debug mode, perform adebug run. To execute your code in Non-Debug(release) mode, perform a run. To hold a device inReset after programming, use the Hold in Reset iconin the toolbar.

    Recommended SettingsComponent Setting

    Oscillator • OSC bits set properly• RunningPower Supplied by targetWDT Disabled (device dependent)Code-Protect DisabledTable Read Protect DisabledLVP DisabledBOD VDD > BOD VDD min.JTAG DisabledAVDD and AVSS Must be connectedPGCx/PGDx Proper channel selected, if applicableProgramming VDD voltage levels meet programming spec

    Note: See MPLAB PICkit 4 In-Circuit Debugger online help for more information.

    Reserved ResourcesFor information on reserved resources used by the debugger, see the MPLAB PICkit 4 In-Circuit Debugger online help.

    3

    *External target board power supply to be provided by user.

    Typical Debugger System – Device with On-Board Debug Circuitry

    Alternative Debugger System – ICE Device

    C: 10 M: 100 Y: 100 K: 20 PMS: 7621C

    Transition Socket

    if needed

    Device-ICE

    StandardAdapterHeader

    Power

    Micro-B USB from computer

    Target Board

    Micro-B USB from computer

    Target Device

    Power

    Target Board

    if needed

  • www.microchip.com/pickit4

    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. © 2019, Microchip Technology Incorporated. All Rights Reserved. 2/19 DS50002721B

    ADDITIONAL INFORMATION

    Target Circuit Design Precautions• 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 suffi cient.• Do not use diodes on PGC/PGD: they will prevent bidirectional communication between the

    debugger and the target device.• Do not exceed recommended cable lengths: Refer to the Hardware Specifi cation of the

    MPLAB PICkit 4 online help or user's guide for cable lengths.

    21543678

    Target VDD (tVDD)

    Target Application PC Board

    V DD

    PGCPGD

    VSS

    AVDD**

    AVSS**

    XTAL*

    Incorrect

    VPP/MCLR

    Targ

    et A

    pplic

    atio

    n D

    evic

    e

    V

    Circuitry and Connector Pinouts

    21543678

    Target VDD (tVDD)

    50 kΩTypical

    Target Application PC Board

    VDD

    PGCPGD

    VSS

    AVDD

    AVSS

    XTAL

    Correct

    VPP/MCLRTypical cable

    length is 6 inches

    Targ

    et A

    pplic

    atio

    n D

    evic

    eTypical 6-Pin ICSP PinoutPin Target MPLAB® PICkit™ 4

    1 MCLR/VPP NMCLR2 VDD Target VDD3 VSS (ground) Ground4 PGD (ICSPDAT) PGD5 PGC (ICSPCLK) PGC6 Do Not Connect Do Not Connect7 Reserved for Future use8 Reserved for Future use

    Connect Pin 1 to Pin 1

    Pinouts for Debug InterfacesMPLAB® PICkit™ 4 DEBUG

    Con

    nect

    or

    Pin # Pin Name ICSP (MCHP)MIPS EJTAG

    CORTEX® SWD AVR

    ® JTAG AVR ISP (&DW) UPDI PDI AW DW(IRE) TPI

    1 TVPP MCLR MCLR MCLR2 TVDD VDD VIO_REF VTG VTG VTG VTG VTG VTG VTG VTG3 GND GND GND GND GND GND GND GND GND GND GND4 PGD DAT TDO SWO TDO MISO DAT DAT DATA DAT5 PGC CLK TCK SWCLK TCK SCK CLK6 TAUX AUX RESET RESET CLK dW RST7 TTDI TDI TDI MOSI8 TTMS TMS SWDIO TMS

    Pinouts for Data Stream InterfacesMPLAB® PICkit™ 4 DATA STREAM

    Pin # DMCI/DGI U(S)ART/CDC DGI SPI12 VTG3 GND4 MISO5 SCK6 (SCK)7 TX MOSI8 RX SS