quick start guide - microchip technologyww1.microchip.com/downloads/en/devicedoc/50002538b.pdf**...

3
QUICK START GUIDE MPLAB ® ICD 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 ICD 4 to the computer using the USB cable. 2. Connect external power either to the target board or debugger. 1 2 www.microchip.com/icd4 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 (Debug>Debug Project). To execute your code in Non-Debug (release) mode, perform a run (Run>Run Project). 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 ICD 4 In-Circuit Debugger online help for more information. Reserved Resources For information on reserved resources used by the debug- ger, see the MPLAB ICD 4 In-Circuit Debugger online help. 3 *Microchip Power Supply (AC002014) not included. Available at www.microchipDIRECT.com. **External target board power supply provided by user. Typical Configuration (With On-Board Debug Circuitry) Debugger Target Board Target Device Device with on-board ICE circuitry External Target Board Power Supply** External Microchip Power Supply (AC002018)* USB OR Alternative Configuration (Without Loss of Pins) Debugger Target Board Transition Socket Device-ICE Header Standard Adapter Processor Extension Pak OR Device-ICE ICD Header External Target Board Power Supply** USB External Microchip Power Supply (AC002018)*

Upload: others

Post on 19-Jun-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: QUICK START GUIDE - Microchip Technologyww1.microchip.com/downloads/en/DeviceDoc/50002538B.pdf** Target device must be running with an oscillator for the debugger to function as a

QUICK START GUIDEMPLAB® ICD 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 ICD 4 to the computer using the USB cable.

2. Connect external power either to the target board or debugger.

1

2

www.microchip.com/icd4

C: 80 M: 45 Y: 0 K: 55 PMS: 7694C

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 (Debug>Debug Project). To execute your code in Non-Debug (release) mode, perform a run (Run>Run Project). To hold a device in Reset after programming, use the Hold in Reset icon in the toolbar.

Recommended SettingsComponent Setting

Oscillator • OSC bits set properly • Running

Power 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 ICD 4 In-Circuit Debugger online help for more information.

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

3

*Microchip Power Supply (AC002014) not included. Available at www.microchipDIRECT.com.**External target board power supply provided by user.

Typical Configuration (With On-Board Debug Circuitry)

Debugger

Target Board

Target Device

Device with on-board ICE circuitry

External Target Board Power Supply**

External Microchip Power Supply (AC002018)*

USB

OR

Alternative Configuration (Without Loss of Pins)

Debugger

Target Board

Transition Socket

Device-ICE

Header

StandardAdapter

Processor Extension Pak

OR

Device-ICE

ICD Header

External Target Board Power Supply**

USB

External Microchip Power Supply (AC002018)*

Page 2: QUICK START GUIDE - Microchip Technologyww1.microchip.com/downloads/en/DeviceDoc/50002538B.pdf** Target device must be running with an oscillator for the debugger to function as a

www.microchip.com/icd4

ADDITIONAL INFORMATION

Target Circuit Design Precautions• Do not use greater than 100 µF capacitance on Vdd: Depending on the overall load, it will

prevent the target from powering quickly when MPLAB ICD 4 is the source of power.• Do not use capacitors on MCLR: They will prevent fast transitions of Vpp.• Do not use multiplexing on PGC/PGD: They are dedicated for communications to

MPLAB ICD 4.• 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 diodes on PGC/PGD: They will prevent bidirectional communication

between MPLAB ICD 4 and the target PIC® MCU.• Do not exceed recommended cable lengths: Refer to the Hardware Specification of

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

21543

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

21543

Target VDD (tVDD)

50 kΩTypical

Target Application PC Board

V DD

PGCPGD

VSS

AVDD**

AVSS**

XTAL*tVDD

MPLAB® ICD 4Internal Circuitry (simplified)

VPP

Correct

VPP/MCLRTarget VDD (tVDD) is used to power the input/output drivers in the MPLAB ICD 4 debugger

tVDD

tVDD

tVDD

tVDD

Typical cable length is 6 inches

Targ

et A

pplic

atio

n D

evic

e

* MPLAB ICD 4 is controlled by a 32-bit MCU with an Arm® Cortex®-M7 core. ** 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.

RJ-11 to RJ-45 PinoutsPin RJ-11 Function Pin RJ-45

JTAG Test Mode Select 1 TMs1 Reserved 2

2 PGC (ICSPCLK) Standard Com Clock/ TCK (JTAG Test Clock) 3 PGC (ICSPCLK)

3 PGD (ICSPDAT) Standard Com Data/ TDO (JTAG Test Data Output) 4 PGD (ICSPDAT)

4 GND Ground 5 GND5 Vdd_TGT Power On Target 6 Vdd_TGT6 Vpp Power 7 Vpp

JTAG Test Data Input 8 TDI

The modular cable with the RJ-11 connector attaches to the RJ-45 socket on the MPLAB ICD 4.

RJ-11 Connector/Cable RJ-45 Socket

123456

12345678

Standard ConnectionAt Target

Bottom ViewOf Target Board

2 4 6

1 3 5

Page 3: QUICK START GUIDE - Microchip Technologyww1.microchip.com/downloads/en/DeviceDoc/50002538B.pdf** Target device must be running with an oscillator for the debugger to function as a

www.microchip.com/icd4

The Microchip name and logo, the Microchip logo, MPLAB and PIC are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. Arm and Cortex are registered trademarks of ARM Limited in the EU and other countries. All other trademarks mentioned herein are property of their respective companies. © 2019, Microchip Technology Incorporated. All Rights Reserved. 2/19 DS50002538B

ADDITIONAL INFORMATION

Verify the Debugger is Functioning Properly

Refer to instructions in the MPLAB ICD 4 documenta-tion for using the ICD Test Interface Board to verify the unit is operating properly.

ICD Test Interface Board

USB Cableto Computer

Modular Cable

MPLAB® ICD 4

Power from the computer via USB cableor external Microchip power supply

Pinouts for Debug InterfacesMPLAB® ICD 4 DEBUG

Con

nect

or

Pin # Pin Name ICSP (MCHP)

MIPS EJTAG

CORTEX® SWD JTAG DW(IRES) UPDI PDI AW AVR®_ISP TPI

8 TTDI TTDI TDI MOsI7 TVPP MCLR MCLR MCLR6 TVDD VDD VIO_REF VTG VTG VTG VTG VTG VTG VTG VTG5 GND GND GND GND GND GND GND GND GND GND GND4 PGD DAT TDO SWO TDO DAT DAT DATA MISO DAT3 PGC CLK TCK SWCLK TCK SCK CLK2 TAUX AUX TAUX RESET SW-DAT CLK RESET RST1 TTMS TTMS SWDIO TMS

RJ-11 Connector/CableRJ-45 Socket

123456

12345678

Pinouts for Data Stream InterfacesMPLAB® ICD 4 DATA STREAM

Pin # DMCI/DGI U(S)ART/CDC DGI SPI

8 TX MOsI76 VTG VTG5 GND GND4 MISO3 SCK2 (SCK)1 RX SS