PIC16F688
11.9 In-Circuit Serial Programming
11.10 In-Circuit Debugger
This allows customers to manufacture boards with
unprogrammed devices and then program the micro-
controller just before shipping the product. This also
allows the most recent firmware or a custom firmware
to be programmed.
Since in-circuit debugging requires access to the data
and MCLR pins, MPLAB® ICD 2 development with an
14-pin device is not practical. A special 20-pin
PIC16F688 ICD device is used with MPLAB ICD 2 to
provide separate clock, data and MCLR pins and frees
all normally available pins to the user.
The device is placed into a Program/Verify mode by
holding the RA0 and RA1 pins low, while raising the
MCLR (VPP) pin from VIL to VIHH. See the
A special debugging adapter allows the ICD device to
be used in place of a PIC16F688 device. The
debugging adapter is the only source of the ICD device.
“PIC12F6XX/16F6XX
Memory
Programming
Specification” (DS41204) for more information. RA0
becomes the programming data and RA1 becomes the
programming clock. Both RA0 and RA1 are Schmitt
Trigger inputs in Program/Verify mode.
When the ICD pin on the PIC16F688 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 11-9 shows which
features are consumed by the background debugger:
A typical In-Circuit Serial Programming connection is
shown in Figure 11-11.
FIGURE 11-11:
TYPICAL IN-CIRCUIT
SERIAL PROGRAMMING
CONNECTION
TABLE 11-9: DEBUGGER RESOURCES
Resource
Description
I/O pins
Stack
ICDCLK, ICDDATA
1 level
To Normal
Connections
External
Connector
Signals
Program Memory Address 0h must be NOP
*
PIC16F688
700h-7FFh
+5V
0V
VDD
For more information, see “MPLAB® ICD 2 In-Circuit
Debugger User’s Guide” (DS51331), available on
Microchip’s web site (www.microchip.com).
VSS
VPP
MCLR/VPP/RA3
RA1
RA0
CLK
FIGURE 11-12:
20-Pin PDIP
20-PIN ICD PINOUT
Data I/O
In-Circuit Debug Device
NC
1
2
20
19
18
17
16
15
14
13
12
11
ICDCLK
ICDDATA
ICDMCLR/VPP
*
*
*
VDD
RA5
RA4
3
Vss
RA0
RA1
RA2
4
5
To Normal
Connections
6
RA3
RC5
7
RC0
RC1
RC2
NC
RC4
8
* Isolation devices (as required)
9
RC3
ICD
10
© 2007 Microchip Technology Inc.
DS41203D-page 127