Datasheet
© 2008 Microchip Technology Inc. DS41249E-page 125
PIC16F785/HV785
FIGURE 15-11: TYPICAL IN-CIRCUIT
SERIAL PROGRAMMING
CONNECTION
15.10 In-Circuit Debugger
• In-circuit debugging requires clock, data and
MCLR
pins. A special 28-pin PIC16F785-ICD
device is used with MPLAB
®
ICD 2 to provide
separate clock, data and MCLR
pins so that no
pins are lost for these functions, leaving all 18 of
the PIC16F785/HV785 I/O pins available to the
user during debug operation.
• This special ICD device is mounted on the top of a
header and its signals are routed to the MPLAB
ICD 2 connector. On the bottom of the header is a
20-pin socket that plugs into the user’s target via
the 20-pin stand-off connector.
• When the ICD
pin on the PIC16F785-ICD device
is held low, the In-Circuit Debugger functionality is
enabled. This function allows simple debugging
functions when used with MPLAB ICD 2. When
the microcontroller has this feature enabled, some
of the resources are not available for general use.
Table 15-9 shows which features are consumed
by the background debugger.
TABLE 15-9: DEBUGGER RESOURCES
For more information, see “MPLAB
®
ICD 2 In-Circuit
Debugger User’s Guide” (DS51331), available on
Microchip’s web site (www.microchip.com).
FIGURE 15-12: 28-PIN ICD PINOUT
Resource Description
I/O pins ICDCLK, ICDDATA
Stack 1 level
Data RAM 65h-70h, F0h
Program Memory Address 0h must be NOP
700h-7FFh
External
Connector
Signals
To Normal
Connections
To Normal
Connections
V
DD
VSS
MCLR/VPP/RA3
RA1
RA0
+5.0V
0V
V
PP
CLK
Data I/O
* * *
*
* Isolation devices (as required)
PIC16F785
28-Pin PDIP
PIC16F785/HV785-ICD
In-Circuit Debug Device
SHNTREG
ICDMCLR/VPP
VDD
RA5
RA4
RA3
ICDCLK
ICDDATA
Vss
RA0
RC6 RB4
RA1
RA2
RC5
RC4
RC3
RC0
RC1
RC2
1
2
3
4
5
6
7
8
9
10
28
27
26
25
24
23
22
21
20
19
NC NC
RC7
RB7
ICD
RB5
RB6
NC
11
12
13
14
18
17
16
15