English
Language : 

PIC32MX795F512L-80IPT Datasheet, PDF (21/68 Pages) Microchip Technology – PIC32 Flash Programming Specification
PIC32
7.0 ENTERING 2-WIRE ENHANCED
ICSP MODE
To use the 2-wire PGEDx and PGECx pins for pro-
gramming, they must be enabled. Note that any pair of
programming pins available on a particular device may
be used, however, they must be used as a pair. PGED1
must be used with PGEC1, and so on.
Note: If using the 4-wire JTAG interface, the
following procedure is not necessary.
The following steps are required to enter 2-wire
Enhanced ICSP mode:
1. The MCLR pin is briefly driven high, then low.
2. A 32-bit key sequence is clocked into PGEDx.
3. MCLR is then driven high within a specified
period of time and held.
Please refer to Section 20.0 “AC/DC Characteristics
and Timing Requirements” for timing requirements.
The programming voltage applied to MCLR is VIH,
which is essentially VDD, in PIC32 devices. There is no
minimum time requirement for holding at VIH. After VIH
is removed, an interval of at least P18 must elapse
before presenting the key sequence on PGEDx.
The key sequence is a specific 32-bit pattern: ‘0100
1101 0100 0011 0100 1000 0101 0000’ (the
acronym ‘MCHP’, in ASCII). The device will enter
Program/Verify mode only if the key sequence is valid.
The MSb of the Most Significant nibble must be shifted
in first.
Once the key sequence is complete, VIH must be
applied to MCLR and held at that level for as long as
the 2-wire Enhanced ICSP interface is to be
maintained. An interval of at least time P19 and P7
must elapse before presenting data on PGEDx. Signals
appearing on PGEDx before P7 has elapsed will not be
interpreted as valid.
Upon successful entry, the programming operations
documented in subsequent sections can be performed.
While in 2-wire Enhanced ICSP mode, all unused I/Os
are placed in the high-impedance state.
FIGURE 7-1:
MCLR
ENTERING ENHANCED ICSP™ MODE
P20
P6
P14
VIH
P19 P7
VIH
VDD
PGEDx
PGECx
Program/Verify Entry Code = 0x4D434850
0 1 0 0 1 ... 0 0 0 0
b31 b30 b29 b28 b27
b3 b2 b1 b0
P18
P1A
P1B
 2007-2013 Microchip Technology Inc.
DS61145L-page 21