Pickit 3 Programmer/Debugger User's Guide
Total Page:16
File Type:pdf, Size:1020Kb
PICkit™ 3 Programmer/Debugger User’s Guide 2010 Microchip Technology Inc. DS51795B 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 Trademarks applications and the like is provided only for your convenience The Microchip name and logo, the Microchip logo, dsPIC, and may be superseded by updates. It is your responsibility to KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART, ensure that your application meets with your specifications. PIC32 logo, rfPIC and UNI/O are registered trademarks of MICROCHIP MAKES NO REPRESENTATIONS OR Microchip Technology Incorporated in the U.S.A. and other WARRANTIES OF ANY KIND WHETHER EXPRESS OR countries. IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor, INCLUDING BUT NOT LIMITED TO ITS CONDITION, MXDEV, MXLAB, SEEVAL and The Embedded Control QUALITY, PERFORMANCE, MERCHANTABILITY OR Solutions Company are registered trademarks of Microchip FITNESS FOR PURPOSE. Microchip disclaims all liability Technology Incorporated in the U.S.A. arising from this information and its use. Use of Microchip Analog-for-the-Digital Age, Application Maestro, CodeGuard, devices in life support and/or safety applications is entirely at dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN, the buyer’s risk, and the buyer agrees to defend, indemnify and ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial hold harmless Microchip from any and all damages, claims, Programming, ICSP, Mindi, MiWi, MPASM, MPLAB Certified suits, or expenses resulting from such use. No licenses are logo, MPLIB, MPLINK, mTouch, Octopus, Omniscient Code conveyed, implicitly or otherwise, under any Microchip Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit, intellectual property rights. PICtail, REAL ICE, rfLAB, Select Mode, Total Endurance, TSHARC, UniWinDriver, WiperLock and ZENA are trademarks of Microchip Technology Incorporated 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. © 2010, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. Printed on recycled paper. ISBN: 978-1-60932-373-8 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® MCUs and dsPIC® DSCs, KEELOQ® code hopping 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. DS51795B-page 2 2010 Microchip Technology Inc. PICkit™ 3 USER’S GUIDE Table of Contents Preface ........................................................................................................................... 5 Chapter 1. Overview 1.1 Introduction ................................................................................................... 13 1.2 PICkit 3 Programmer/Debugger Defined ...................................................... 13 1.3 How the PICkit 3 Programmer/Debugger Helps You ................................... 15 1.4 PICkit 3 Programmer/Debugger Components .............................................. 16 Chapter 2. Theory of Operation 2.1 Introduction ................................................................................................... 17 2.2 PICkit 3 vs. PICkit 2 ...................................................................................... 17 2.3 Debugger to Target Communication ............................................................ 17 2.4 Communication Connections ....................................................................... 19 2.5 Debugging .................................................................................................... 21 2.6 Requirements for Debugging ....................................................................... 22 2.7 Programming ................................................................................................ 24 2.8 Resources Used by the Debugger ............................................................... 24 Chapter 3. Installation 3.1 Introduction ................................................................................................... 25 3.2 Installing the Software .................................................................................. 25 3.3 Connecting the Target .................................................................................. 25 3.4 Setting Up the Target Board ......................................................................... 26 3.5 Setting Up MPLAB® IDE .............................................................................. 27 Chapter 4. General Setup 4.1 Introduction ................................................................................................... 29 4.2 Starting the MPLAB IDE Software ................................................................ 29 4.3 Creating a Project ......................................................................................... 29 4.4 Viewing the Project ....................................................................................... 30 4.5 Building the Project ...................................................................................... 30 4.6 Setting Configuration Bits ............................................................................. 30 4.7 Setting the Debugger or Programmer .......................................................... 30 4.8 Debugger/Programmer Limitations .............................................................. 31 Chapter 5. PICkit 3 Debug Express 5.1 Introduction ................................................................................................... 33 5.2 PICkit 3 Debug Express Kit Contents ........................................................... 33 5.3 Installing the Hardware and Software .......................................................... 33 2010 Microchip Technology Inc. DS51795B-page 3 PICkit™ 3 User’s Guide Chapter 6. PICkit 3 Programmer-To-Go 6.1 Introduction ................................................................................................... 35 6.2 USB Power for PICkit 3 Programmer-To-Go ................................................ 35 6.3 PICkit 3 Programmer-To-Go Supported Devices ......................................... 36 6.4 Setting up PICkit 3 for Programmer-To-Go Operation ................................. 37 6.5 Using PICkit 3 Programmer-To-Go .............................................................. 38 6.6 Exiting Programmer-To-Go Mode ................................................................ 40 Chapter 7. Troubleshooting First Steps 7.1 Introduction ................................................................................................... 43 7.2 The 5 Questions to Answer First .................................................................. 43 7.3 Top 10 Reasons Why You Can’t Debug ...................................................... 43 7.4 Other Things to Consider ............................................................................. 44 Chapter 8. Frequently Asked Questions (FAQs) 8.1 Introduction ................................................................................................... 45 8.2 How Does It Work ........................................................................................ 45 8.3 What’s Wrong ............................................................................................... 46 Chapter 9. Error Messages 9.1 Introduction ................................................................................................... 49 9.2 Specific Error Messages .............................................................................. 49 9.3 General Corrective Actions .......................................................................... 52 Chapter 10. Debugger Function Summary 10.1 Introduction