Home

PICkitTM 2 Microcontroller Programmer USER'S GUIDE

image

Contents

1. MICROCHIP PICkit 2 Microcontroller Programmer USER S GUIDE 2005 Microchip Technology Inc Note the following details of the code protection feature on Microchip devices e 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 e 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 s
2. 2 Overview PICkit 2 Programming Software PICkit 2 MICROCONTROLLER PROGRAMMER CONTENTS The PICkit 2 Microcontroller Programmer Kit contains the following items 1 The PlCkit 2 Microcontroller Programmer 2 USBcable PlCkit 2 Starter Kit CD ROM INTRODUCING THE PICkit 2 MICROCONTROLLER PROGRAMMER The PICkit 2 Microcontroller Programmer is a low cost development programmer It is capable of programming most of Microchip s Flash microcontrollers For specific products supported see the README file included on the PICkit 2 Starter Kit CD ROM The PICkit 2 Microcontroller Programmer Operating System firmware can be easily upgraded from the programming software New device support can be added by updating the operating system The latest firmware is available on Microchip s web site www microchip com Note The 2 Microcontroller Programmer is intended for development programming For production programming please consider the MPLAB PM3 Programmer or other third party programmers designed for the production environment 2005 Microchip Technology Inc DS51553A page 5 PICkit V 2 User s Guide 1 5 PICkit 2 MICROCONTROLLER PROGRAMMER OVERVIEW The PICkit 2 Microcontroller Programmer overview is shown in Figure 1 1 FIGURE 1 1 PICkit 2 MICROCONTROLLER PROGRAMMER Legend 1 Status LEDs 3 Lanyard Connection 5 Pin 1 Marker 2 Push Button 4 USB
3. FIGURE 2 5 ENABLE TARGET POWER PICkit 2 Microcontroller Programmer File Device Famil Programmer Tools About Midrange Device Configuratio Device PICT User ID s OxfF FF FF SF CheckSum OxFFFF Read write Verify Erase Quit Target Power 2 3 4 Import HEX File To import a compiled program hex file select File gt Import HEX as shown in Figure 2 6 Browse for the hex file and click Open The code is displayed in the Program Memory and EE Data Memory windows The name of the hex file is displayed in the Source block Configuration Word Ox3FFF JST AT 2 6 IMPORT HEX FILE PICkit 2 Microcontroller Programmer File Device Family Programmer Tools About Export File Configuration Word s3ED 4 DEEE Bandiaap File successtully imported Ctrl g Read write Verify Erase Quit Target Power M Program memory Source Reversible LEDs HEX OOOO 1683 SUPP 00855 0187 3010 1283 1703 30F7 009E 1283 1303 3001 OO9F 3005 DOA 2005 Microchip Technology Inc DS51553A page 13 PICkit 2 User s Guide 2 3 5 Write After a device family has been selected and file has been imported the target MCU can be programmed by clicking on the Write button PlCmicro MCU will be erased and programmed with the hex code previously imported The status of the Write operation is displaye
4. PP 25 Worldwide Sales and 28 2005 Microchip Technology Inc DS51553A page iil PICkit 2 User s Guide NOTES DS51553A page iv 2005 Microchip Technology Inc MICROCHIP PICkit 2 USER S GUIDE Preface NOTICE TO CUSTOMERS All documentation becomes dated and this manual is no exception Microchip tools and documentation are constantly evolving to meet customer needs so some actual dialogs and or tool descriptions may differ from those in this document Please refer to our web site www microchip com to obtain the latest documentation available Documents are identified with a DS number This number is located on the bottom of each page in front of the page number The numbering convention for the DS number is DSXXXXXA where XXXXX is the document number and A is the revision level of the document For the most up to date information on development tools see the MPLAB IDE on line help Select the Help menu and then Topics to open a list of available on line help files INTRODUCTION This chapter contains general information about this user s guide and customer support that will be useful prior to using the PICkit 2 Microcontroller Programmer Items discussed in this chapter include Document Layout Conventions Used in this Guide Warranty Registration Recommended Reading The Microchip Web Si
5. dsPICDEM dsPICDEM net dsPICworks ECAN ECONOMONITOR FanSense FlexROM fuzzyLAB In Circuit Serial Programming ICSP ICEPIC Linear Active Thermistor MPASM MPLIB MPLINK MPSIM PICkit PICDEM PICDEM net PICLAB PICtail PowerCal Powerlnfo PowerMate PowerTool rfLAB rfPICDEM Select Mode Smart Serial SmartTel Total Endurance and WiperLock 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 2005 Microchip Technology Incorporated Printed in the U S A All Rights Reserved LI Printed on recycled paper Microchip received ISO TS 16949 2002 quality system certification for its worldwide headquarters design wafer fabrication facilities in Chandler and Tempe Arizona and Mountain View California in October 2003 The Company s quality system processes and procedures are for its PICmicro 8 bit MCUs KEELOG 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 DS51553A page ii 2005 Microchip Technology Inc MICROCHIP PICkit 2 USER S GUIDE Table of Contents miris e ai 1 Chapter 1 P
6. 2 Microcontroller Programmer and how to resolve them 5 2 FREQUENTLY ASKED QUESTIONS Device is not recognized Question Why am I receiving an Insert Device message Answer Verify that the device is supported and that the target MCU is connected to the PICkit 2 Microcontroller Programmer in accordance with Chapter PICkit 2 and ICSP Current Limit Exceeded Question Why am receiving the error message USB Hub Current Limit Exceeded from the Microsoft Windows program Answer Check for shorts on the circuit board Microsoft Windows Driver Question After plugging the PICkit 2 Microcontroller Programmer into the USB port Windows 98 SE asks for a driver Where is the driver Answer PICkit 2 Microcontroller Programmer uses the drivers included with Windows When Windows 98 SE prompts for a driver select Search for the best driver for your device Then select the check box next to Microsoft Windows Update and click Next Windows will automatically install the appropriate driver Do not use Microchip s ICD 2 USB driver Verify and Read Return all Zeros Question When the Verify or Read buttons are clicked the Program Memory window comes up with all zeros What is wrong Answer The device may be code protected Ensure code protection has not been selected in the Configuration Word 2005 Microchip Technology Inc DS51553A page 23 PICkit 2 User s Guide Mi
7. Fax 905 673 6509 ASIA PACIFIC Australia Sydney Tel 61 2 9868 6733 Fax 61 2 9868 6755 China Beijing Tel 86 10 8528 2100 Fax 86 10 8528 2104 China Chengdu Tel 86 28 8676 6200 Fax 86 28 8676 6599 China Fuzhou Tel 86 591 8750 3506 Fax 86 591 8750 3521 China Hong Kong SAR Tel 852 2401 1200 Fax 852 2401 3431 China Shanghai Tel 86 21 5407 5533 Fax 86 21 5407 5066 China Shenyang Tel 86 24 2334 2829 Fax 86 24 2334 2393 China Shenzhen Tel 86 755 8203 2660 Fax 86 755 8203 1760 China Shunde Tel 86 757 2839 5507 Fax 86 757 2839 5571 China Qingdao Tel 86 532 502 7355 Fax 86 532 502 7205 ASIA PACIFIC India Bangalore Tel 91 80 2229 0061 Fax 91 80 2229 0062 India New Delhi Tel 91 11 5160 8631 Fax 91 11 5160 8632 Japan Kanagawa Tel 81 45 471 6166 Fax 81 45 471 6122 Korea Seoul Tel 82 2 554 7200 Fax 82 2 558 5932 or 82 2 558 5934 Malaysia Penang Tel 011 604 646 8870 Fax 011 604 646 5086 Philippines Manila Tel 011 632 634 9065 Fax 011 632 634 9069 Singapore Tel 65 6334 8870 Fax 65 6334 8850 Taiwan Kaohsiung Tel 886 7 536 4818 Fax 886 7 536 4803 Taiwan Taipei Tel 886 2 2500 6610 Fax 886 2 2508 0102 Taiwan Hsinchu Tel 886 3 572 9526 Fax 886 3 572 6459 EUROPE Austria Weis Tel 43 7242 2244 399 Fax 43 7242 2244 393 Denmark Ballerup Tel 45 4450 2828 Fax 45 4485 2829 France Massy Tel 33 1 69 53 63 2
8. PGD is a bidirectional synchronous serial programming data line If the design permits dedicate these pins for ICSP However if the application circuit requires that these pins be used in the application circuit design the circuitry in a manner that does not alter the signal level and slew rates Isolation circuitry will vary according to the application Figure 3 1 shows one possibility by using series resistors to isolate the ICSP signals from the application circuit DS51553A page 18 2005 Microchip Technology Inc PICkit 2 and ICSP 3 4 VDD During ICSP programming the PlCmicro MCU needs to be powered in accordance with the device specification Typically the PICmicro MCU supply voltage is connected to the application circuit supply voltage The application circuit can be powered by the PICkit 2 Microcontroller Programmer or externally There a few precautions that need to be observed 3 4 1 The application circuit is powered by the PICkit 2 Microcontroller Programmer The PICkit 2 Microcontroller Programmer supply voltage VDD is 5V If the application circuit operates at a different voltage isolation circuitry may be required so that the two voltage levels do not conflict The PICkit 2 Microcontroller Programmer supply voltage VDD is 5V CAUTION The USB port current limit is set to 100 mA If the target plus PICkit 2 Microcontroller Programmer exceeds this current limit the USB port will turn off T
9. Port Connection 6 Programming Connector 1 5 1 USB Port Connection The USB Port Connection is a USB mini B connector Connect the PICkit 2 Microcontroller Programmer to the PC using the supplied USB cable 1 5 2 Status LEDs The Status LEDs indicate the status of the PICkit 2 Microcontroller Programmer 1 Power green Power is applied to the 2 Microcontroller Programmer via the USB port 2 Target yellow The PICkit 2 Microcontroller Programmer is powering the target device 3 Busy red The PICkit 2 Microcontroller Programmer is busy with a function such as Program mode or is alerting that a function is in progress 1 5 3 Push Button The push button is for initiating a function and presently not implemented DS51553A page 6 2005 Microchip Technology Inc PICkit V 2 Overview 1 5 4 Programming Connector The programming connector is a 6 pin connector 0 100 spacing to connect to the target device See Figure 1 2 for the pinout specification Pin 1 is indicated by the triangle For more information on how to use the PICkit 2 Microcontroller Programmer with In Circuit Serial Programming ICSP refer to Chapter 3 PICkit 2 and ICSP FIGURE 1 2 PICkit 2 CONNECTOR PINOUT Pin Descriptions 1 VPP MCLR 2 VDD Target 3 Vss Ground 4 ICSPDAT PGD 5 ICSPCLK PGC 6 Auxiliary Note The connector is 6 pin header with 0 100
10. spacing and can accept 0 025 square pins 1 5 5 Lanyard Connection The lanyard connection is a convenient place to attach a lanyard or line to keep the PICkit 2 Microcontroller Programmer from becoming lost 2005 Microchip Technology Inc DS51553A page 7 PICkit 2 User s Guide 1 6 PROGRAMMING SOFTWARE Start the PICkit 2 Programming Software by selecting Start gt Programs gt 2 Microcontroller Programmer gt PICkit 2 The programming interface appears as shown in Figure 1 3 For more information on how to use the PICkit M 2 Programming Software see Chapter 2 Getting Started FIGURE 1 3 PICkit 2 Programming Software PICkit 2 Microcontroller Programmer Bl File Device Family Programmer Tools About Menu Bar Midrange Device Configuration Configuration Word Ux3FFF i UserlD s Ox7F7F7F7F md Device Configuration CheckSum OxFDFF Insert Device Status Bar Progress Bar Read write Verify Erase Target Power M Program memory Source Mone empty erased Device Present Program Memory Du i Data EEPROM Memory MICROCHIP DS51553A page 8 2005 Microchip Technology Inc PICkit V 2 Overview 1 6 1 Menu Bar The menu bar selects various functions of the PICkit 2 Programming Software A summary of the functions are FILE Import File Import a hex file for programming Export File Export a hex file read from
11. 0 Fax 33 1 69 30 90 79 Germany Ismaning Tel 49 89 627 144 0 Fax 49 89 627 144 44 Italy Milan Tel 39 0331 742611 Fax 39 0331 466781 Netherlands Drunen Tel 31 416 690399 Fax 31 416 690340 England Berkshire Tel 44 118 921 5869 Fax 44 118 921 5820 04 20 05 DS51553A page 28 2005 Microchip Technology Inc
12. 005 Microchip Technology Inc PICkit 2 User s Guide PICkit 2 SCHEMATIC DIAGRAM PAGE 2 OF 2 FIGURE 6 2 sr cO CN 906 18ININ Lu 1VddSOl 023 6L O0 8r LvOSININ 906 L8ININ H194S9I 9066 LENIN co lt 4 1 1 ASZ 2p ONLY YOSELINN gio da zn asn A OM OL uo MO N suuni ufiip d L L N LOL GGA 191 vO T AQL mo vLO dNNd ddA ll 311 L O 65 DS51553A page 26 PICkit 2 USER S GUIDE NOTES 2005 Microchip Technology Inc DS51553A page 27 WORLDWIDE SALES AND SERVICE AMERICAS Corporate Office 2355 West Chandler Blvd Chandler AZ 85224 6199 Tel 480 792 7200 Fax 480 792 7277 Technical Support http support microchip com Web Address www microchip com Atlanta Alpharetta GA Tel 770 640 0034 Fax 770 640 0307 Boston Westborough MA Tel 774 760 0087 Fax 774 760 0088 Chicago ltasca IL Tel 630 285 0071 Fax 630 285 0075 Dallas Addison TX Tel 972 818 7423 Fax 972 818 2924 Detroit Farmington Hills Tel 248 538 2250 Fax 248 538 2260 Kokomo Kokomo IN Tel 765 864 8360 Fax 765 864 8387 Los Angeles Mission Viejo CA Tel 949 462 9523 Fax 949 462 9608 San Jose Mountain View CA Tel 650 215 1444 Fax 650 961 0286 Toronto Mississauga Ontario Canada Tel 905 673 0699
13. 6F630 676 The AUX line must be connected to the RA4 T1G pin oet Band Gap Calibration Value Sets the band gap value only for PIC12F629 675 and PIC16F630 676 TOOLS Code Protect Device Enables code protection features of the microcontroller on future write operations Target Power Power target from PICkit 2 Microcontroller Programmer Check Board Verifies communication with the PICkit 2 Microcontroller Programmer and reads the device ID of the target MCU Download PICkit 2 Operating System Performs a download of the PICkit 2 Microcontroller Programmer firmware operating system ABOUT This displays a dialog box indicating the version and date 2005 Microchip Technology Inc DS51553A page 9 PICkit 2 User s Guide 1 6 2 Device Configuration The Device Configuration window displays the PlCmicro MCU device User ID Configuration Word and Checksum It also displays OSCCAL and Band Gap which are available only on PIC12F629 675 and PIC16F630 676 devices For mid range 14 bit core devices the PICkit 2 Microcontroller Programmer reads the device ID and displays it in the window For baseline 12 bit core devices the user must select the device from a drop down box 1 6 3 Status Bar The status bar displays text status of the operations in progress If an operation is successful the status bar will display green background If an operation fails the status bar will display red If
14. ICkit 2 Overview iM IAM OGUCUON ER 5 comm 5 1 3 PlCkit 2 Microcontroller Programmer Contents 5 1 4 Introducing the PICkit 2 Microcontroller Programmer 5 1 5 PlCkit 2 Microcontroller Programmer Overview 6 1 6 Programming SOMmMWAle oit cue pe 8 Chapter 2 Getting Started EE MR 11 2 2 Installing the PICkit 2 Programming Software 11 2 3 Using the 2 Programming Software 11 Chapter 3 PICkit 2 and ICSP TR PE 17 3 2 Isolate VPPMCLR PROTPIN ASS qs 18 Isolate ICSPCLK or PGC ICSPDAT or PGD pins 18 Cr Nd RC 19 SRI RR 20 3 6 Other GConsiderallOliS ti secede duco cot iei bae bosse esp ao 20 Chapter 4 Updating the PICkit 2 Operating System AT IMTOAUCUION EN 21 4 2 Updating the PICkit 2 Microcontroller Programmer 21 Chapter 5 Troubleshooting ons Miguigereitisile eT 23 5 2 Frequently Asked Questions iae at ae dre fenetres 23 Appendix 6 Hardware Schematics
15. PICkit 2 Low Pin Count Demo Board User s Guide DSXXXXX Consult this document for instructions on how to use Microchip Technology s Low Pin Count devices 8 pin 14 pin and 20 pin This document includes a series of tutorials MPLAB IDE Simulator Editor User s Guide 0551025 Consult this document for more information pertaining to the installation and features of the MPLAB Integrated Development Environment IDE Software THE MICROCHIP WEB SITE Microchip provides online support via our web site at www microchip com This web site is used as a means to make files and information easily available to customers Accessible by using your favorite Internet browser the web site contains the following information Product Support Data sheets and errata application notes and sample programs design resources user s guides and hardware support documents latest software releases and archived software General Technical Support Frequently Asked Questions FAQs technical support requests online discussion groups Microchip consultant program member listing Business of Microchip Product selector and ordering guides latest Microchip press releases listing of seminars and events listings of Microchip sales offices distributors and factory representatives DEVELOPMENT SYSTEMS CUSTOMER CHANGE NOTIFICATION SERVICE Microchip s customer notification service helps keep customers current on Microchip products Subscribers will rec
16. PP voltage is applied the application circuit needs to take into consideration that the typical VPP voltage is 12V This may be an issue in the following situations 3 2 1 If the VPP pin is used as a MCLR pin The application circuit typically is connected to a pull up resistor capacitor circuit as recommended in the device data sheet Care must be taken so that the VPP voltage slew rate is not slowed down and exceeds the rise time in the programming specification typically 1 us If a supervisory circuit or a push button is interfaced to the MCLR pin it is recommended that they be isolated from the VPP voltage by using a Schottky type diode or limiting resistor as shown in Figure 3 1 For more information about using supervisory circuits with ICSP see Application Note AN820 System Supervisors in ICSP Architectures 0500820 3 2 2 If the VPP is used as an 1 0 port The application circuit that connects to the I O pin may not be able to handle the 12V voltage It is recommended to use a Schottky type diode or limiting resistor as shown in Figure 3 1 to isolate the circuitry 3 3 ISOLATE ICSPCLK OR PGC AND ICSPDAT OR PGD PINS The ICSPCLK or PGC and ICSPDAT or PGD pins need to be isolated from the application circuit to prevent the programming signals from being affected by the application circuitry ICSPCLK or PGC is a unidirection synchronous serial programming clock line from the programmer to the target ICSPDAT or
17. a device Exit Exit the program duplicated with the Quit button DEVICE FAMILY Baseline 12 bit Core Configures the programming software for baseline Flash devices Mid range 14 bit Core Configure the programming software for mid range Flash devices PIC18 Configures the programming software for PIC18F Flash devices future feature presently grayed out PIC18J Configures the programming software for PIC18FXXJXX Flash devices future feature presently grayed out dsPIC Configures the programming software for dsPIC Flash devices future feature presently grayed out PROGRAMMER Head Device Reads program memory data EEPROM memory ID locations and configuration bits Write Device Writes program memory data EEPROM memory ID locations and configuration bits Verify Verifies program memory data EEPROM memory ID locations and configuration bits read from the target MCU against the code stored in the programming software Erase Performs a bulk erase of the target MCU OSCCAL and band gap values are preserved PIC12F629 675 and PIC16F630 676 only Blank Check Performs a blank check of program memory data EEPROM memory ID locations and configuration bits Full Erase OSCCAL and BG erased Performs a bulk erase including the OSCCAL and Band Gap BG values PIC12F629 675 and PIC16F630 676 only Hegenerate OSCCAL Regenerates the OSCCAL value only for PIC12F629 675 and PIC1
18. an operation alerts a caution the status bar will display yellow 1 6 4 Progress Bar The progress bar displays the progress of an operation 1 6 5 Program Memory Program code can be loaded into the PICkit M 2 Programming Software from File Import HEX or it can be read from the device by clicking on the Read button The origin of the code is displayed in the Source block The Program Memory window displays the program code in hexadecimal The code cannot be edited in the window The check box next to the Program Memory window controls whether the program memory will be programmed into the device or not If the box is checked the code displayed in the Program Memory window will be programmed into and used to verify the device If the box is not checked the program memory will not be programmed and it will not be used to verify the device 1 6 6 Data EEPROM Memory Similar to Program Memory above program code can be loaded into the PICkit 2 Programming Software from File Import HEX or it can be read from the device by clicking on the Read button The origin of the code is displayed in the Source block The Data EEPROM Memory window displays the program code in hexadecimal The code cannot be edited in the window The check box next to the Data EEPROM Memory window controls whether the data EEPROM memory will be programmed into the device or not If the box is checked the code displayed in the Data EEPROM Memory window will be pro
19. autoexec bat Square brackets Optional arguments Curly brackets and pipe Choice of mutually exclusive argu errorlevel 0 1 character ments An OR selection Lowercase characters in Type of data filename quotes Ellipses Used to imply but not show addi list tional text that is not relevant to the list option example list option Oxnnn A hexadecimal number where nisa 0x007A hexadecimal digit Italic characters A variable argument it can be eithera char isascii char type of data in lowercase characters or a specific example in uppercase characters Interface Arial font Underlined italic text A menu selection from the menu bar File gt Save with right arrow Bold characters A window or dialog button to click OK Cancel Characters in angle A key on the keyboard lt Tab gt lt Ctrl C gt brackets lt gt Documents Arial font Italic characters Referenced books MPLAB IDE User s Guide WARRANTY REGISTRATION Please complete the enclosed Warranty Registration Card and mail it promptly Sending in the Warranty Registration Card entitles users to receive new product updates Interim software releases are available at the Microchip web site DS51553A page 2 2005 Microchip Technology Inc Preface RECOMMENDED READING It is recommended that you become familiar with the documents listed below prior to using the PICkit 2 Microcontroller Programmer
20. crosoft Windows 95 98 NT Question Can I run on Windows 95 98 NT Answer No These operating systems either do not support USB or have drivers that are not compatible EE Ml UMMM DS51553A page 24 2005 Microchip Technology Inc PICkit 2 USER S GUIDE MICROCHIP Appendix 6 Hardware Schematics INTRODUCTION 1 6 This appendix contains PICkit M 2 Microcontroller Programmer schematic diagrams PICkit 2 SCHEMATIC DIAGRAM PAGE 1 OF 2 FIGURE 6 1 COANA niooeqow en 8 d 191 asn AS mro L 22 191 dWNd 1 54 H9 XL 994 dA Q S2H WA Q v94 gana Ld99 C94 SON edOO ISOLL LOU IMO IL OSOIL 094 da9d 19Y 98 09d cIaH 944 IVH OHT9 CISO W9Od LI4Y 54 4 0I8 LLNV Y8S N LOL 27 esa 139uv1 18 WvVa90 d LMS NO ddA gt 105 VOS gt ISI YON XNY gt 1245021 1704521 84 LOL MOVES Od Cd99 6NV E44 IM19 LOSO OWA CLNI 8NV C8 OS MOS V LNI LNV L88 VAIS IQS 0 L13 0 LNI C ENV 08H 3S ddA N TOW 1nOc9 NIQATH SS FNV SV AOMW LOO LO POOL PNV H TJJHA ENV EV J3HAO J33HA CNV ON H OS 0SS238 514 LA DS51553A page 25 2005 Microchip Technology Inc pose LAN gO 191 NION OM OL 6 O00 YO6ELINN 82H 10 lt NO OM OL AOVaaaad ddA 906 L8ININ 2
21. d in the status bar located under the Device Configuration window Note The device will be erased prior to programming The 2 Microcontroller Programmer uses the bulk erase method that requires VDD voltage between 4 5 to 5 5V If the write is successful the status bar turns green and displays Write Successful as shown in Figure 2 7 FIGURE 2 7 WRITE SUCCESSFUL STATUS PICkit 2 Microcontroller Programmer File Device Family Programmer Tools About Midrange Device Configuration Device PICT User ID s CheckSum OxC950 write Successful V erfy Erase Quit Target Power M Program memory Source Reversible LEDs HEX OOOO 1683 30FF 0085 0187 3010 1282 1703 a 000s SUF 1283 1303 3001 USF 3008 ODA Configuration ord Ox300 4 Bandi ap If the write fails the status bar turns red and displays Verify failed as shown in Figure 2 8 This error indicates that the data was corrupted during the programming sequence If this error is displayed try writing the program to the device again If the error continues see Chapter 5 Troubleshooting for assistance FIGURE 2 8 WRITE ERROR STATUS PICkit 2 Microcontroller Programmer File Device Family Programmer Tools About Midrange Device Configuration Device PICT User ID s CheckSum OxC950 Configuration ord Oxs0D4 SEGAL Bandi ap Very Erase Quit Target Pow
22. e 2 Microcontroller Programmer and application circuit PICmicro MCU The goal is to keep the ICSP signals within the level and slew rate specifications for successful programming I X P i DS51553A page 20 2005 Microchip Technology Inc MICROCHIP PICkit 2 USER S GUIDE Chapter 4 Updating the PICkit 2 Operating System 4 1 INTRODUCTION This chapter describes how to update the PICkit 2 Microcontroller Programmer s operating system 4 2 UPDATING THE PICkit 2 MICROCONTROLLER PROGRAMMER To update the PICkit 2 Microcontroller Programmer firmware Operating System complete the following steps Step 1 Download the latest PICkit 2 Operating System from the Microchip web site at www microchip com Step 2 From the menu select Tools gt Download PICKit 2 Operating System as shown in Figure 4 1 FIGURE 4 1 DOWNLOAD 2 OPERATING SYSTEM 2 PICk
23. e code complete the following steps 1 Import hex file 2 Select Tools Code Protect Device as shown in Figure 2 9 3 Click Write FIGURE 2 9 ENABLE CODE PROTECT PICkit 2 Microcontroller Programmer File Device Family Programmer Tools About Midrange Device Configuration Device Hot Present Device Power UserlD s Ox F7F FFF Check Board 000000000 Checksum 05950 Download PICkit 2 Operating System File successfully imported Note Ifthe device is read after it has been code protected Program Memory and Data EEPROM Memory windows will display all zeros 2005 Microchip Technology Inc DS51553A page 15 PICkit 2 User s Guide 2 3 10 Erase The Erase function erases the program memory data EEPROM memory ID and configuration bits However this function is not normally needed since the Write function performs an erase operation prior to programming the PICmicro MCU To erase the device click the Erase button Note The PICkit 2 Microcontroller Programmer uses the bulk erase method that requires VDD voltage between 4 5 to 5 5V 4 44 2 4 DS51553A page 16 2005 Microchip Technology Inc MICROCHIP PICkit 2 USER S GUIDE Chapter 3 PICkit 2 ICSP INTRODUCTION The 2 Microcontroller Programmer can program PlCmicro microcontrollers that are installed in an application circuit using In Circuit Serial Pro
24. e through several channels Distributor or Representative Local Sales Office Field Application Engineer FAE e Technical Support Development Systems Information Line Customers should contact their distributor representative or field application engineer FAE for support Local sales offices are also available to help customers A listing of sales offices and locations is included in the back of this document Technical support is available through the web site at http support microchip com In addition there is a Development Systems Information Line which lists the latest ver sions of Microchip s development systems software products This line also provides information on how customers can receive currently available upgrade kits The Development Systems Information Line numbers are 1 800 755 2345 United States and most of Canada 1 480 792 7302 Other International Locations DOCUMENT REVISION HISTORY Revision A May 2005 Initial Release of this Document TROUBLESHOOTING e See Chapter 5 for information on common problems DS51553A page 4 2005 Microchip Technology Inc MICROCHIP PICkit 2 USER S GUIDE Chapter 1 PICkit M 2 Overview INTRODUCTION This chapter introduces the PICkit M 2 Microcontroller Programmer and describes the PICkit M 2 Microcontroller Programmer features and menu functions HIGHLIGHTS This chapter discusses The PICkit 2 Contents he PICkit
25. eive e mail notification whenever there are changes updates revisions or errata related to a specified product family or development tool of interest To register access the Microchip web site at www microchip com click on Customer Change Notification and follow the registration instructions The Development Systems product group categories are Compilers The latest information on Microchip C compilers and other language tools These include the MPLAB C18 and MPLAB C30 C compilers MPASMTM and MPLAB ASM30 assemblers MPLINK and MPLAB LINK30 object linkers and MPLIB and MPLAB LIB30 object librarians Emulators The latest information on Microchip in circuit emulators This includes the MPLAB ICE 2000 and MPLAB ICE 4000 In Circuit Debuggers The latest information on the Microchip in circuit debugger MPLAB ICD 2 MPLAB IDE The latest information on Microchip MPLAB IDE the Windows Integrated Development Environment for development systems tools This list is focused on the MPLAB IDE MPLAB SIM simulator MPLAB IDE Project Manager and general editing and debugging features Programmers The latest information on Microchip programmers These include the MPLAB PM3 and PRO MATE II device programmers and the PICSTART Plus and PICkit 1development programmers 2005 Microchip Technology Inc DS51553A page 3 PICkit 2 USER S GUIDE CUSTOMER SUPPORT Users of Microchip products can receive assistanc
26. er M Program memory Source Reversible LEDs HEX OOOO 1683 30FF 0085 0187 3010 1282 1703 a 000s SUF 1283 1303 3001 USF 3008 ODA DS51553A page 14 2005 Microchip Technology Inc Getting Started 2 3 6 Automatic File Reload Prior to each write the imported hex file time stamp is compared to the version on the disk If the version on the disk is newer it is reloaded This occurs only when a hex file has been read from the disk This feature ensures that the latest version built by MPLAB IDE will be written to the device 2 3 7 Verify The Verify function verifies the device program to the imported hex file It compares all areas of memory including program memory data EEPROM memory ID and configu ration bits To verify the code import the hex file and click the Verify button If the code is the same the status bar turns green and displays Device Verified If a discrepancy is found the status bar turns red and displays where the error is located Error in Program Memory Data EEPROM Memory or Configuration Bits 2 3 8 Read To view the code written to the PlCmicro MCU click the Read button The code is displayed in the Program and Data EEPROM Memory windows for your review If all zeros are displayed it is possible that the device is code protected 2 3 9 Code Protect Device The Code Protect Device function enables the code protection features of the MCU To protect th
27. grammed into and used to verify the device If the box is not checked the data EEPROM memory will not be programmed and it will not be used to verify the device DS51553A page 10 2005 Microchip Technology Inc MICROCHIP PICkit 2 USER S GUIDE Chapter 2 Getting Started 2 1 INTRODUCTION This chapter gives instruction on how to get started using the PICkit 2 Microcontroller Programmer to program Flash based PlCmicro microcontroller units MCU For information on how to use the 2 Microcontroller Programmer with In Circuit Serial Programming ICSP refer to Chapter PICkit 2 and ICSPTM For information on how to update the PICkit 2 firmware operating system refer to Chapter 4 Updating the PICkit 2 Operating System 2 2 INSTALLING THE PICkit 2 PROGRAMMING SOFTWARE Insert the PICkit M 2 Starter Kit CD ROM into the CD ROM drive In a few moments the introductory screen should be displayed Follow the directions on the screen for installing the PICkit M 2 Programming Software If the introductory screen does not appear browse to the CD ROM directory and select the AutorunPro exe program 2 3 USING THE PICkit 2 PROGRAMMING SOFTWARE Start the PICkit 2 Programming Software by selecting Start gt Programs gt 2 Microcontroller Programmer gt PICkit 2 The programming interface appears as shown in Figure 2 1 FIGURE 2 1 PICkit 2 PROGRAMMING SOFTWARE PICki
28. gramming ICSP In Circuit Serial Programming ICSP requires five signals e VPP Programming Voltage when applied the device goes into Programming mode ICSPCLK or PGC Programming Clock a unidirectional synchronous serial clock line from the programmer to the target e ICSPDAT or PGD Programming Data a bidirectional synchronous serial data line VDD Power Supply positive voltage Vss Power Supply ground reference However the application circuit must be designed to allow all the programming signals to be connected to the PICmicro device without distorting the programming signals Figure 3 1 shows a typical circuit as a starting point when designing an application circuit for ICSP For successful ICSP programming the precautions in the following sections need to be followed Note For details on how a specific device is programmed refer to the device programming specification available from the Microchip web site at www microchip com FIGURE 3 1 TYPICAL ICSP APPLICATION CIRCUIT Isolation Circuitry Resistor or Schottky type diode ES PICkit 2 Programming Header VPP MCLR VDD Vss ICSPDAT PGD ICSPCLK PGC AUX RAO ICSPDAT To Application RA1 ICSPCLK CES Circuit RAS MCLR VPP 22 Target Microcontroller Device Typical Values 2005 Microchip Technology Inc DS51553A page 17 PICkit 2 User s Guide 3 2 ISOLATE VPP MCLR PORT PIN When V
29. he target may be powered externally if more power is required 3 4 2 The application circuit is powered externally The PICkit 2 Microcontroller Programmer supply voltage VDD is 5V If the application circuit operates at a different voltage isolation circuitry may be required so that the two voltage levels do not conflict CAUTION The PICkit 2 Microcontroller Programmer supply voltage VDD is 5V 3 4 3 Bulk Erase is used Some MCU devices use bulk erase function to erase program memory data EEPROM memory ID locations and configuration bits Typically the bulk erase function requires a supply voltage VDD of 4 5 to 5 5 Volts refer to the device programming specification for device specific requirements This voltage range can be a problem if the application circuit is designed to operate at a different supply voltage range In order to bulk erase the PICmicro MCU the application circuit needs to take into consideration the bulk erase voltage requirement while protecting any voltage sensitive circuitry 2005 Microchip Technology Inc DS51553A page 19 PICkit 2 User s Guide 3 5 Vss power supply ground reference Vss must be at the same potential as the application circuit 3 6 OTHER CONSIDERATIONS Minimize the distance the ICSP signals must travel by placing the ICSP connector as close to the application circuit PlCmicro MCU as possible Minimize any cable length between th
30. it 2 Microcontroller Programmer 1 File Device Family Programmer Tools About Midrange Device Configuration Code Protect Device Device PIC Device Power User ID s FF AF Check Board Checksum 0 8 050 Download PICkit 2 Operating System Step 3 Browse to the directory where the latest Operating System code was saved as shown in Figure 4 2 Step 4 Select the PK2 hex file and click on the Open button FIGURE 4 2 SELECT PICkit 2 OPERATING SYSTEM Select PICkit 2 Operating System download E 2 x Look in PICKit 2 e PK2V010000 hex History Desktop My Documents Computer gt File name PK2 hex Network P Files of type PICKit 2 Hex files PK2 hex Cancel progress of the OS update will be displayed in the status bar of the programming software and the Busy LED on the PICkit 2 Microcontroller Programmer will flash When the update completes successfully the status bar will display Operating System Verified and the Busy LED will go out The operating system update is then complete 2005 Microchip Technology Inc DS51553A page 21 PICkit 2 User s Guide NOTES DS51553A page 22 2005 Microchip Technology Inc MICROCHIP PICkit 2 USER S GUIDE Chapter 5 Troubleshooting 5 1 INTRODUCTION This chapter describes questions and answers to common problems associated with using the PICkit
31. ratia Device User ID s CheckSum OxF FFF SZ Read Write Verify Erase Quit M Target Power If the Baseline 12 bit core Flash device family is selected the user must select the specific device from the device drop down box as shown in Figure 2 4 Configuration Word OxSFFF FS Bandi ap CAUTION Ensure that the correct Baseline Flash device has been selected These devices do not contain a device ID to confirm device selection Choosing the wrong Baseline Flash device may cause an erasing of the OSCCAL value stored in the last memory location FIGURE 2 4 SELECT BASELINE FLASH DEVICE PICkit 2 Microcontroller Programmer File Device Family Programmer Tools About Baseline Device Configuratio Lee B Configuration Word User ID s 202 BandGap PIC OF 204 FIC10F 206 DS51553A page 12 2005 Microchip Technology Inc Getting Started 2 3 3 Target Power The 2 Microcontroller Programmer can supply power to the target To enable power to the target device check the Target Power check box as shown in Figure 2 5 Note When starting the PICkit 2 Microcontroller Program target power defaults to off The USB port current limit is set to 100 mA If the target plus PICkit 2 Microcontroller Programmer exceed this current limit the USB port will turn off The target may be powered externally if more power is required
32. t 2 Microcontroller Programmer File Device Family Programmer Tools About gt Midrange Device Configuration Device FICTBFBESU LserlD s CheckSum OSFFFF Configuration Word Ox3FFF OSCE Bandi ap PICKit 2 Firmware Version 1 00 00 Read Write Verify Erase Quit Target Power Program memory r MICROCHIP 2005 Microchip Technology Inc DS51553A page 11 PICkit 2 User s Guide 2 3 1 Selecting the Device Family The PICkit 2 Microcontroller Programmer is capable of programming a variety of Flash based Microchip microcontrollers The first step in using the PICkit 2 Microcontroller Programmer is to select the device family by clicking on the Device Family menu as shown in Figure 2 2 FIGURE 2 2 SELECT DEVICE FAMILY NES PICkit 2 Microcontroller Programmer File Device Family Programmer Tools About Mi Baseline 12 bit core De v Midrange 14 bit Core Configuration word x3FFF Picis BandGap 2 3 2 Device Identification If the Mid range 14 bit core Flash device family is selected the PICkit 2 Microcontroller Programmer will automatically read the device ID word from PICmicro MCU and display it in the Configuration window as shown in Figure 2 3 FIGURE 2 3 IDENTIFY DEVICE PICkit 2 Microcontroller Programmer File Device Family Programmer Tools About Midrange Device Contigu
33. te Development Systems Customer Change Notification Service Customer Support Document Revision History Troubleshooting DOCUMENT LAYOUT This document describes how to use the PICkit 2 Microcontroller Programmer The manual layout is as follows Chapter 1 PICkit 2 Overview An overview of the PICkit 2 Microcontroller Programmer Chapter 2 Getting Started Provides instruction on how to get started using the PICkit M 2 Microcontroller Programmer to program Flash based microcontroller units MCU e Chapter 3 PICkit 2 and ICSP Provides instruction on programming with the PICkit 2 Microcontroller Programmer using In Circuit Serial Programming ICSP Chapter 4 Updating the PICkit 2 Operating System Provides instruction on how to update your PICkit 2 Microcontroller Programmer s Operating System 2005 Microchip Technology Inc DS51553A page 1 PICkit 2 USER S GUIDE Chapter 5 Troubleshooting Provides resolutions for frequently asked questions that solve common problems when using the PICkit M 2 Microcontroller Programmer e Appendix A Hardware Schematics Illustrates the PICkit 2 Microcontroller Programmer hardware schematic diagrams CONVENTIONS USED IN THIS GUIDE This manual uses the following documentation conventions DOCUMENTATION CONVENTIONS Code Courier font Plain characters Sample code define START Filenames and paths c
34. ue for relief under that Act Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates It is your responsibility to ensure that your application meets with your specifications MICROCHIP MAKES REPRESENTATIONS WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED WRITTEN ORAL STATUTORY OTHERWISE RELATED TO THE INFORMATION INCLUDING BUT NOT LIMITED TO ITS CONDITION QUALITY PERFORMANCE MERCHANTABILITY FITNESS FOR PURPOSE Microchip disclaims all liability arising from this information and its use Use of Microchip s products as critical components in life support systems is not authorized except with express written approval by Microchip No licenses are conveyed implicitly or otherwise under any Microchip intellectual property rights QUALITY MANAGEMENT SYSTEM CERTIFIED BY DNV ISO TS 16949 2002 Trademarks The Microchip name and logo the Microchip logo Accuron dsPIC KEELOQ microID MPLAB PIC PICmicro PICSTART PRO MATE PowerSmart rfPIC and SmartShunt are registered trademarks of Microchip Technology Incorporated in the U S A and other countries AmpLab FilterLab Migratable Memory MXDEV MXLAB PICMASTER SEEVAL SmartSensor and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U S A Analog for the Digital Age Application Maestro

Download Pdf Manuals

image

Related Search

Related Contents

500090 - 00 - Manual Chiara  Wagner 0283022 Use and Care Manual  Q Shock Service Manual  Petra Dinner4All TG 29.00  [MI 611-227] 875 Series Intelligent Analyzers - Operation  Audiovox MP5720USB User's Manual  Baixar Manual de Reparo  Manual  取扱説明書 - SoftBank SELECTION  Samsung 570VTFT Benutzerhandbuch  

Copyright © All rights reserved.
Failed to retrieve file