English
Language : 

PIC16F87 Datasheet, PDF (149/214 Pages) Microchip Technology – 18/20/28-Pin Enhanced FLASH Microcontrollers with nanoWatt Technology
15.14 In-Circuit Debugger
When the DEBUG bit in the configuration word is pro-
grammed to a ‘0’, the In-Circuit Debugger functionality
is enabled. This function allows simple debugging func-
tions when used with MPLAB® ICD. When the micro-
controller has this feature enabled, some of the
resources are not available for general use. Table 15-7
shows which features are consumed by the background
debugger.
TABLE 15-7: DEBUGGER RESOURCES
I/O pins
RB6, RB7
Stack
1 level
Program Memory
Address 0000h must be NOP
Data Memory
Last 100h words
0x070 (0x0F0, 0x170, 0x1F0)
0x1EB-0x1EF
To use the In-Circuit Debugger function of the micro-
controller, the design must implement In-Circuit Serial
Programming connections to MCLR/VPP, VDD, GND,
RB7 and RB6. This will interface to the In-Circuit
Debugger module available from Microchip, or one of
the third party development tool companies.
15.15 Program Verification/Code
Protection
If the code protection bit(s) have not been pro-
grammed, the on-chip program memory can be read
out for verification purposes.
15.16 ID Locations
Four memory locations (2000h - 2003h) are designated
as ID locations, where the user can store checksum or
other code identification numbers. These locations are
not accessible during normal execution, but are read-
able and writable during program/verify. It is recom-
mended that only the four Least Significant bits of the
ID location are used.
PIC16F87/88
15.17 In-Circuit Serial Programming
PIC16F87/88 microcontrollers can be serially pro-
grammed while in the end application circuit. This is
simply done with two lines for clock and data and three
other lines for power, ground, and the programming
voltage (see Figure 15-13 for an example). This allows
customers to manufacture boards with unprogrammed
devices and then program the microcontroller just
before shipping the product. This also allows the most
recent firmware or a custom firmware to be
programmed.
For more information on serial programming, please
refer to the PIC16F87/88 Programming Specification
(DS39607).
FIGURE 15-13:
TYPICAL IN-CIRCUIT
SERIAL PROGRAMMING
CONNECTION
External
Connector
Signals
+5V
0V
VPP
CLK
Data I/O
RB3/PGM
To Normal
Connections
*
PIC16F87/88
VDD
VSS
MCLR/VPP
RB6
RB7
RB3†
***
VDD
To Normal
Connections
* Isolation devices (as required).
† RB3 only used in LVP mode.
 2003 Microchip Technology Inc.
Preliminary
DS30487B-page 147