Datasheet

PEP and Debug Header Specification
DS50001292W-page 6 2006-2015 Microchip Technology Inc.
1.3 WHY DO I NEED A HEADER TO DEBUG?
Some PIC
®
microcontrollers (MCUs), 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 V
DD, 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 debug-
ging 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 signif-
icant 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, so see Chapter 3. Optional Debug
Headers”.
Microchip lists what header must be ordered to work with your device, if one is required.
Simply consult Chapter 2. “Required Debug Headers”.
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-1: PRODUCTION DEVICE VS. HEADER DEVICE
ENABLE
ICDMCLR
V
DD
ICDCLK
ICDDATA
Vss
ICD
NC
1
2
3
4
5
6
7
20
19
18
17
16
15
14
JP1
2
1
3
V
DD
To Tool Connector
8
9
10
11
12
13
V
DD
Vss
1
2
3
4
5
6
7
14
13
12
11
10
9
8
Device on Debug Header
Production Device