Debug Header Specification 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 online Help. Select the Help menu, and then Topics to open a list of available online Help files. This chapter contains the following: Why Do I Need A Header To Debug Debug Details Programming Details General Header Setup Calibration Bits Performance Issues Related Debug Tools Customer Support 2006-2012 Microchip Technology Inc. DS51292T-page 1Debug Header Specification WHY DO I NEED A HEADER TO DEBUG Some PIC microcontrollers, particularly low pin count devices (with 20 pins or less), generally must use a header for debugging. This is done to free up I/O lines for your application and to make production parts more affordable. Optional headers are also available for high pin count devices (with 64 pins or higher). Debugging requires a two-line connection (plus VDD, VSS and VPP) to communicate with the device. In a high pin count device, losing a few I/O lines is generally not a prob- lem for most designs. But in a low pin count device, it can be a critical problem. Imagine having to do an 8-pin design where there are only 5 I/Os, having used up 2 I/Os just for debugging Headers are also used to save you money. In high pin count devices, adding debugging to the silicon can generally be done at little or no cost since the silicon is already fairly large. However, low pin count devices are low cost specifically because they use very little silicon. So, adding debugging circuitry on-board these parts would add significant cost since it would raise the amount of silicon used by a considerable percentage. The header places the cost for debugging up front and frees your production parts from the extra cost of an unused debug module. Microchip also makes optional debug modules, usually for high pin count devices. The module is optional because you can still do basic debugging without a header, but if you use one, you get back I/O lines, and may also gain additional debugging features. Only certain devices can use an optional header, see the device page on our website for details. Microchip lists what header must be ordered to work with your device, if one is required. Simply consult the device page on our website, or our other ordering guides. Note that in all cases, devices can be programmed in circuit (called ICSP) with very few exceptions. Even devices without an internal debug feature can still be pro- grammed by connecting the programming/debugging tool to the in-circuit programming lines. These devices simply cannot perform debugging without a header. FIGURE 1: PRODUCTION DEVICE VS. HEADER DEVICE (-ICE/-ICD) VDD 1 20 ENABLE ICDCLK 19 2 ICDMCLR ICDDATA 3 1 14 3 18 VDD Vss 1 2 2 13 4 17 3 12 5 16 VDD Vss 4 11 15 6 JP1 14 5 10 7 13 8 6 9 12 9 7 8 11 10 ICD NC Production Device To Tool Connector -ICE/ICD Device on Debug Header DS51292T-page 2 2006-2012 Microchip Technology Inc.