icd2 poster 51265h

1
Configure PC Communications Programming with the Universal Programming Module (AC162049) Target Powered from MPLAB ICD 2 (<200 mA, 5V only to Target) Target Powered from Power Supply Connect Power and Target Application NOTE: Always apply power to MPLAB ICD 2 before applying power to your target applications. Install the Latest Software NOTE: Do not connect the RS-232 or USB cable until after the MPLAB IDE software is installed. Install the MPLAB IDE software onto your PC using the MPLAB IDE CD-ROM or download the software from the MPLAB IDE page of the Microchip web site (www.microchip.com/MPLAB). Do NOT run the MPLAB IDE program at this time. Open the MPLAB IDE program and configure the MPLAB IDE software to work properly with MPLAB ICD 2: 1. For debugging, select Debugger>Select Tool>MPLAB ICD 2. For programming, select Programmer>Select Programmer>MPLAB ICD 2. 2. To set the communications port for MPLAB ICD 2, select Debugger/Programmer>Settings>Communication tab and choose a port (USB, COM1, COM2, etc.). Click Apply. 3. Select the Power tab. If you are supplying power directly to the target application, verify the Power target circuit from MPLAB ICD 2 checkbox is empty. If you want to power the target circuit from the MPLAB ICD 2, select the checkbox. Click OK. NOTE: This option is not available for 16-bit devices. Configure MPLAB IDE Additional Information Power Supply BUSY ERROR POWER MPLAB ICD 2 PC Univ Prog Module Using MPLAB ® ICD 2 PC BUSY ERROR POWER MPLAB ICD 2 Univ Prog Module Power Supply RS-232 PC BUSY ERROR POWER MPLAB ICD 2 Target App Power Supply USB PC BUSY ERROR POWER MPLAB ICD 2 Target App Power Supply PC BUSY ERROR POWER MPLAB ICD 2 Target App Power Supply BUSY ERROR POWER MPLAB ICD 2 PC Target App Power Supply Power Supply Legend: RS-232 USB PC Interface ICD Interface ICD 2 Power and Comm. from ICD 2 Power from Power Supply • Oscillator – must be operational for MPLAB ICD 2 debug operations. • Power – must be connected to target. Internal buffers on PGC and PGD are connected to MPLAB ICD 2's VDD when MPLAB ICD 2 is powering the target (less than 200 mA, 5V operation only). When the target has its own power supply, the target VDD is connected to these buffers. This also provides level translation (down to 2V) for low-voltage operation. • WDT – Disable the Watchdog Timer while debugging. NOTE: On some devices, this is not required. • Code-Protect – Disable all code protection while debugging. • Table Read Protect – Disable all table read protection while debugging. • Reserved Resources – Avoid reserved program memory and file registers used by the debugger. See the Reserved Resources section below. • LVP – Do not enable Low-Voltage Programming. • PLL – Switching to PLL oscillator requires power down of target. • AVDD and AVSS – If target PIC® MCU has these Analog power pins, they also must be connected to the proper power and ground. • Ensure that Configuration bits are correctly programmed, especially for the oscillator. • If BOR is enabled, ensure VDD is above brown-out levels. • During Program, ensure VDD voltage levels meet required programming specifications. Guidelines 1. Connect MPLAB ICD 2 to a PC COM port with an RS-232 cable. 2. Select the COM port to set up for communication, i.e., Control Panel>System>Hardware>Device Manager>Ports> COMx, (where x = 1, 2, 3, etc.), right click on the desired COM port, and select Properties. 3. Click the Port Settings tab and set "Flow Control" to "Hardware". 4. Click the Advanced button. In the Advanced Settings dialog, turn off (uncheck) "Use FIFO buffers". BUSY ERROR POWER MPLAB ICD 2 RS-232 PC IMPORTANT: Do not allow the Windows ® OS to pick a USB driver. For proper driver installation, follow the HTML installation instructions found in: C:\Program Files\ Microchip\MPLAB IDE\ICD2\Drivers. The HTML file name is "ddicd298.htm" for Windows 98, "ddicd2me.htm" for Windows ME and "ddicd2.htm" for Windows 2000/XP . 1. Connect MPLAB ICD 2 to a PC USB port via a USB cable. 2. Follow the instructions in the HTML file mentioned above to install the drivers. USB BUSY ERROR POWER MPLAB ICD 2 PC Modular Connector Pin Microcontroller Pin 6 Not Used 5 PGC 4 PGD 3 Ground 2 VDD 1 MCLR/VPP Electrical Connections to Target 2 1 5 4 3 Target VDD (tVDD) 10 kTarget Application PC Board VDD VPP/MCLR PGC PGD VSS AVDD** AVSS** XTAL* Target Application PIC MCU *Target PIC MCU must be running with an oscillator for MPLAB ICD 2 to function as a debugger. **If the PIC MCU has AVDD and AVSS lines, they must be connected for MPLAB ICD 2 to operate. tVDD 4.7 ktVDD tVDD 4.7 ktVDD tVDD +5V +12V MPLAB ICD 2 Internal Circuitry (simplified) Target VDD (tVDD) is used to power the Input/Output drivers in MPLAB ICD 2 ICD 2 Connector Target Application Board (Bottom) 2 4 6 1 3 5 No pull-ups on PGC/PGD they will divide the voltage levels since these lines have 4.7 kpull-down resistors in MPLAB ICD 2. No capacitors on PGC/PGD they will prevent fast transitions on data and clock lines during programming and debug communications. No capacitors on MCLR they will prevent fast transitions of VPP. No diodes on PGC/PGD they will prevent bidirectional communication between MPLAB ICD 2 and the target PIC MCU. 1 5 4 VPP/MCLR PGC PGD X X X X Target Circuit Design Considerations © 2006 Microchip Technology Inc., 12/06 DS51265H www.microchip.com For RS-232 For USB Pin Signal Not Used 1 PGC 2 PGD 3 Ground 4 VDD 5 MCLR/VPP 6 1 2 3 4 5 6 MPLAB ICD 2 RJ-11 Jack Pinout NOTE: Not available for 16-bit device targets. Reserved Resources (See on-line help or readme for specifics.) MPLAB ICD 2 has the following restrictions and reserves certain on-chip resources for debugging. See Help>Topics>MPLAB ICD 2 for troubleshooting and limitation information. After the target PIC MCU is programmed to run without MPLAB ICD 2 in your application, none of these restrictions apply: • MCLR/VPP is shared for programming and reset control. • Low-voltage ICSP™ programming (LVP) must be disabled. • PGC and PGD are reserved for programming and in-circuit debugging. Usually these are the RB6 and RB7 pins.

Upload: ngt881

Post on 08-Nov-2014

16 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: ICD2 Poster 51265h

Configure PC Communications➋

Programming with the Universal Programming Module (AC162049)

Target Powered from MPLAB ICD 2(<200 mA, 5V only to Target)

Target Powered from Power Supply

Connect Power and Target Application

NOTE: Always apply power to MPLAB ICD 2 before applying power to your target applications.

Install the Latest SoftwareNOTE: Do not connect the RS-232 or USB cable until after the MPLAB IDE software is installed.Install the MPLAB IDE software onto your PC using the MPLAB IDE CD-ROM or download the software from the MPLAB IDE page of the Microchip web site (www.microchip.com/MPLAB). Do NOT run the MPLAB IDE program at this time.

➊Open the MPLAB IDE program and configure the MPLAB IDE software to work properly with MPLAB ICD 2: 1. For debugging, select Debugger>Select Tool>MPLAB ICD 2.

For programming, select Programmer>Select Programmer>MPLAB ICD 2. 2. To set the communications port for MPLAB ICD 2, select Debugger/Programmer>Settings>Communication tab and choose a

port (USB, COM1, COM2, etc.). Click Apply.3. Select the Power tab. If you are supplying power directly to the target application, verify the Power target circuit from MPLAB

ICD 2 checkbox is empty. If you want to power the target circuit from the MPLAB ICD 2, select the checkbox. Click OK.NOTE: This option is not available for 16-bit devices.

➍ Configure MPLAB IDE

Additional Information

Power Supply

BUSYERRORPOWER

MPLA

B ICD

2

PC

Univ ProgModule

Using MPLAB® ICD 2

PC

BUSYERRORPOWER

MPLA

B ICD

2

Univ ProgModule

Power SupplyRS-232PC

BUSYERRORPOWER

MPLA

B ICD

2

Target App

Power Supply

USBPC

BUSYERRORPOWER

MPLA

B ICD

2

Target App

Power SupplyPC

BUSYERRORPOWER

MPLA

B ICD

2

Target App Power Supply

BUSYERRORPOWER

MPLA

B ICD

2

PC

Target App

Power Supply

Power Supply

Legend:

RS-232 USB

PC Interface ICD Interface

ICD 2 Power and Comm. from ICD 2

Power

from Power Supply

• Oscillator – must be operational for MPLAB ICD 2 debug operations.

• Power – must be connected to target. Internal buffers on PGC and PGD are connected to MPLAB ICD 2's VDD when MPLAB ICD 2 is powering the target (less than 200 mA, 5V operation only). When the target has its own power supply, the target VDD is connected to these buffers. This also provides level translation (down to 2V) for low-voltage operation.

• WDT – Disable the Watchdog Timer while debugging.

NOTE: On some devices, this is not required.

• Code-Protect – Disable all code protection while debugging.

• Table Read Protect – Disable all table read protection while debugging.

• Reserved Resources – Avoid reserved program memory and file registers used by the debugger. See the Reserved Resources section below.

• LVP – Do not enable Low-Voltage Programming.• PLL – Switching to PLL oscillator requires power

down of target.• AVDD and AVSS – If target PIC® MCU has these

Analog power pins, they also must be connected to the proper power and ground.

• Ensure that Configuration bits are correctly programmed, especially for the oscillator.

• If BOR is enabled, ensure VDD is above brown-out levels.

• During Program, ensure VDD voltage levels meet required programming specifications.

Guidelines

1. Connect MPLAB ICD 2 to a PC COM port with an RS-232 cable.

2. Select the COM port to set up for communication, i.e., Control Panel>System>Hardware>Device Manager>Ports> COMx, (where x = 1, 2, 3, etc.), right click on the desired COM port, and select Properties.

3. Click the Port Settings tab and set "Flow Control" to "Hardware".

4. Click the Advanced button. In the Advanced Settings dialog, turn off (uncheck) "Use FIFO buffers".

BUSYERRORPOWER

MPLA

B ICD

2

RS-232

PC

IMPORTANT: Do not allow the Windows® OS to pick a USB driver. For proper driver installation, follow the HTML installation instructions found in: C:\Program Files\ Microchip\MPLAB IDE\ICD2\Drivers. The HTML file name is "ddicd298.htm" for Windows 98, "ddicd2me.htm" for Windows ME and "ddicd2.htm" for Windows 2000/XP.

1. Connect MPLAB ICD 2 to a PC USB port via a USB cable.

2. Follow the instructions in the HTML file mentioned above to install the drivers.

USB

BUSYERRORPOWER

MPLA

B ICD

2

PC

Modular Connector Pin Microcontroller Pin6 Not Used5 PGC4 PGD3 Ground2 VDD

1 MCLR/VPP

Electrical Connections to Target

21543

Target VDD (tVDD)

10 kΩ

Target Application PC Board

VDD

VPP/MCLR

PGCPGD

VSS

AVDD**

AVSS**

XTAL*

Targ

etA

pplic

atio

nP

IC M

CU

*Target PIC MCU must be running with an oscillator for MPLAB ICD 2 to function as a debugger.

**If the PIC MCU has AVDD and AVSS lines, they must be connected for MPLAB ICD 2 to operate.

tVDD

4.7 kΩ

tVDD

tVDD

4.7 kΩ

tVDD

tVDD

+5V

+12V

MPLAB ICD 2Internal Circuitry (simplified)

Target VDD (tVDD) is used to power the Input/Output drivers in MPLAB ICD 2

ICD 2 Connector

Target ApplicationBoard(Bottom)

2 4 6

1 3 5

• No pull-ups on PGC/PGD – they will divide the voltage levels since these lines have 4.7 kΩ pull-down resistors in MPLAB ICD 2.

• No capacitors on PGC/PGD – they will prevent fast transitions on data and clock lines during programming and debug communications.

• No capacitors on MCLR – they will prevent fast transitions of VPP.

• No diodes on PGC/PGD – they will prevent bidirectional communication between MPLAB ICD 2 and the target PIC MCU.

1

5

4

VPP/MCLR

PGC

PGD

X

X

XX

Target Circuit Design Considerations

© 2006 Microchip Technology Inc., 12/06 DS51265Hwww.microchip.com

For RS-232 For USB

Pin SignalNot Used 1

PGC 2PGD 3

Ground 4VDD 5

MCLR/VPP 6

1 2 3 4 5 6

MPLAB ICD 2 RJ-11 Jack Pinout

NOTE: Not available for 16-bit device targets.

Reserved Resources (See on-line help or readme for specifics.)

MPLAB ICD 2 has the following restrictions and reserves certain on-chip resources for debugging. See Help>Topics>MPLAB ICD 2 for troubleshooting and limitation information. After the target PIC MCU is programmed to run without MPLAB ICD 2 in your application, none of these restrictions apply:

• MCLR/VPP is shared for programming and reset control.

• Low-voltage ICSP™ programming (LVP) must be disabled.

• PGC and PGD are reserved for programming and in-circuit debugging. Usually these are the RB6 and RB7 pins.