![](http://datasheet.mmic.net.cn/Microchip-Technology/PIC16F526-I-SL_datasheet_99452/PIC16F526-I-SL_27.png)
2009 Microchip Technology Inc.
DS39689F-page 27
PIC18F2221/2321/4221/4321 FAMILY
2.4
ICSP Pins
The PGC and PGD pins are used for In-Circuit Serial
Programming (ICSP) and debugging purposes. It is
recommended to keep the trace length between the
ICSP connector and the ICSP pins on the device as
short as possible. If the ICSP connector is expected to
experience an ESD event, a series resistor is recom-
mended, with the value in the range of a few tens of
ohms, not to exceed 100.
Pull-up resistors, series diodes and capacitors on the
PGC and PGD pins are not recommended as they will
interfere
with
the
programmer/debugger
com-
munications to the device. If such discrete components
are an application requirement, they should be removed
from the circuit during programming and debugging.
Alternatively, refer to the AC/DC characteristics and
timing requirements information in the respective device
Flash programming specification for information on
capacitive loading limits and pin input voltage high (VIH)
and input low (VIL) requirements.
For device emulation, ensure that the “Communication
Channel Select” (i.e., PGC/PGD pins) programmed
into the device matches the physical connections for
the ICSP to the MPLAB ICD 2, MPLAB ICD 3 or REAL
ICE emulator.
For more information on the ICD 2, ICD 3 and REAL
ICE emulator connection requirements, refer to the
following documents that are available on the
Microchip web site.
“MPLAB ICD 2 In-Circuit Debugger User’s
Guide” (DS51331)
“Using MPLAB ICD 2” (poster) (DS51265)
“MPLAB ICD 2 Design Advisory” (DS51566)
“Using MPLAB ICD 3” (poster) (DS51765)
“MPLAB ICD 3 Design Advisory” (DS51764)
“MPLAB REAL ICE In-Circuit Emulator User’s
Guide” (DS51616)
“Using MPLAB REAL ICE In-Circuit Emulator”
(poster) (DS51749)
2.5
External Oscillator Pins
Many microcontrollers have options for at least two
oscillators: a high-frequency primary oscillator and a
low-frequency
secondary
oscillator
(refer
to
The oscillator circuit should be placed on the same
side of the board as the device. Place the oscillator
circuit close to the respective oscillator pins with no
more than 0.5 inch (12 mm) between the circuit
components and the pins. The load capacitors should
be placed next to the oscillator itself, on the same side
of the board.
Use a grounded copper pour around the oscillator
circuit to isolate it from surrounding circuits. The
grounded copper pour should be routed directly to the
MCU ground. Do not run any signal traces or power
traces inside the ground pour. Also, if using a
two-sided board, avoid any traces on the other side of
the board where the crystal is placed. A suggested
For additional information and design guidance on
oscillator circuits, please refer to these Microchip
Application Notes, available at the corporate web site
(www.microchip.com):
AN826, “Crystal Oscillator Basics and Crystal
Selection for rfPIC and PICmicro Devices”
AN849, “Basic PICmicro Oscillator Design”
AN943, “Practical PICmicro Oscillator Analysis
and Design”
AN949, “Making Your Oscillator Work”
FIGURE 2-3:
SUGGESTED PLACEMENT
OF THE OSCILLATOR
CIRCUIT
2.6
Unused I/Os
Unused I/O pins should be configured as outputs and
driven to a logic low state. Alternatively, connect a 1 k
to 10 k resistor to VSS on unused pins and drive the
output to logic low.
13
Main Oscillator
Guard Ring
Guard Trace
Secondary
Oscillator
14
15
16
17
18
19
20