<s>
In-system	B-Device
programming	I-Device
(	O
ISP	O
)	O
,	O
or	O
also	O
called	O
in-circuit	B-Device
serial	I-Device
programming	I-Device
(	O
ICSP	O
)	O
,	O
is	O
the	O
ability	O
of	O
some	O
programmable	O
logic	O
devices	O
,	O
microcontrollers	B-Architecture
,	O
and	O
other	O
embedded	B-Architecture
devices	I-Architecture
to	O
be	O
programmed	O
while	O
installed	O
in	O
a	O
complete	O
system	O
,	O
rather	O
than	O
requiring	O
the	O
chip	O
to	O
be	O
programmed	O
prior	O
to	O
installing	O
it	O
into	O
the	O
system	O
.	O
</s>
<s>
It	O
also	O
allows	O
firmware	O
updates	O
to	O
be	O
delivered	O
to	O
the	O
on-chip	O
memory	O
of	O
microcontrollers	B-Architecture
and	O
related	O
processors	O
without	O
requiring	O
specialist	O
programming	O
circuitry	O
on	O
the	O
circuit	O
board	O
,	O
and	O
simplifies	O
design	O
work	O
.	O
</s>
<s>
There	O
is	O
no	O
standard	O
for	O
in-system	B-Device
programming	I-Device
protocols	O
for	O
programming	O
microcontroller	B-Architecture
devices	O
.	O
</s>
<s>
Almost	O
all	O
manufacturers	O
of	O
microcontrollers	B-Architecture
support	O
this	O
feature	O
,	O
but	O
all	O
have	O
implemented	O
their	O
own	O
protocols	O
,	O
which	O
often	O
differ	O
even	O
for	O
different	O
devices	O
from	O
the	O
same	O
manufacturer	O
.	O
</s>
<s>
The	O
primary	O
advantage	O
of	O
in-system	B-Device
programming	I-Device
is	O
that	O
it	O
allows	O
manufacturers	O
of	O
electronic	O
devices	O
to	O
integrate	O
programming	O
and	O
testing	O
into	O
a	O
single	O
production	O
phase	O
,	O
and	O
save	O
money	O
,	O
rather	O
than	O
requiring	O
a	O
separate	O
programming	O
stage	O
prior	O
to	O
assembling	O
the	O
system	O
.	O
</s>
<s>
The	O
other	O
advantage	O
is	O
that	O
production	O
can	O
always	O
use	O
the	O
latest	O
firmware	O
,	O
and	O
new	O
features	O
as	O
well	O
as	O
bug	O
fixes	O
can	O
be	O
implemented	O
and	O
put	O
into	O
production	O
without	O
the	O
delay	O
occurring	O
when	O
using	O
pre-programmed	O
microcontrollers	B-Architecture
.	O
</s>
<s>
Microcontrollers	B-Architecture
are	O
typically	O
soldered	O
directly	O
to	O
a	O
printed	O
circuit	O
board	O
and	O
usually	O
do	O
not	O
have	O
the	O
circuitry	O
or	O
space	O
for	O
a	O
large	O
external	O
programming	O
cable	O
to	O
another	O
computer	O
.	O
</s>
<s>
In	O
systems	O
complex	O
enough	O
to	O
require	O
moderately	O
large	O
glue	O
logic	O
,	O
designers	O
may	O
implement	O
a	O
JTAG-controlled	O
programming	O
subsystem	O
for	O
non-JTAG	O
devices	O
such	O
as	O
flash	B-Device
memory	I-Device
and	O
microcontrollers	B-Architecture
,	O
allowing	O
the	O
entire	O
programming	O
and	O
test	O
procedure	O
to	O
be	O
accomplished	O
under	O
the	O
control	O
of	O
a	O
single	O
protocol	O
.	O
</s>
<s>
Starting	O
from	O
the	O
early	O
1990s	O
an	O
important	O
technological	O
evolution	O
in	O
the	O
architecture	O
of	O
the	O
microcontrollers	B-Architecture
was	O
witnessed	O
.	O
</s>
<s>
At	O
first	O
,	O
they	O
were	O
realized	O
in	O
two	O
possible	O
solutions	O
:	O
with	O
OTP	O
(	O
one-time	B-General_Concept
programmable	I-General_Concept
)	O
or	O
with	O
EPROM	B-General_Concept
memories	I-General_Concept
.	O
</s>
<s>
In	O
1993	O
Microchip	O
Technology	O
introduced	O
the	O
first	O
microcontroller	B-Architecture
with	O
EEPROM	B-General_Concept
memory	I-General_Concept
:	O
the	O
PIC16C84	O
.	O
</s>
<s>
EEPROM	B-General_Concept
memories	O
can	O
be	O
electrically	O
erased	O
.	O
</s>
<s>
This	O
feature	O
allowed	O
to	O
lower	O
the	O
realization	O
costs	O
by	O
removing	O
the	O
erasing	O
window	O
above	O
the	O
package	O
and	O
initiate	O
in-system	B-Device
programming	I-Device
technology	O
.	O
</s>
<s>
In	O
the	O
same	O
year	O
,	O
Atmel	O
developed	O
the	O
first	O
microcontroller	B-Architecture
with	O
flash	B-Device
memory	I-Device
,	O
easier	O
and	O
faster	O
to	O
program	O
and	O
with	O
much	O
longer	O
life	O
cycle	O
compared	O
to	O
EEPROM	B-General_Concept
memories	O
.	O
</s>
<s>
Microcontrollers	B-Architecture
that	O
support	O
ISP	O
are	O
usually	O
provided	O
with	O
pins	O
used	O
by	O
the	O
serial	O
communication	O
peripheral	O
to	O
interface	O
with	O
the	O
programmer	O
,	O
a	O
flash/EEPROM	O
memory	O
and	O
the	O
circuitry	O
used	O
to	O
supply	O
the	O
voltage	O
necessary	O
to	O
program	O
the	O
microcontroller	B-Architecture
.	O
</s>
<s>
The	O
communication	O
peripheral	O
is	O
in	O
turn	O
connected	O
to	O
a	O
programming	O
peripheral	O
which	O
provides	O
commands	O
to	O
operate	O
on	O
the	O
flash	O
or	O
EEPROM	B-General_Concept
memory	I-General_Concept
.	O
</s>
<s>
Some	O
microcontrollers	B-Architecture
with	O
a	O
low	O
number	O
of	O
pins	O
share	O
the	O
programming	O
lines	O
with	O
the	O
I/O	O
lines	O
.	O
</s>
<s>
Moreover	O
,	O
it	O
’s	O
important	O
to	O
connect	O
the	O
ISP	O
lines	O
to	O
high	O
impedance	O
circuitry	O
both	O
to	O
avoid	O
a	O
damage	O
of	O
the	O
components	O
by	O
the	O
programmer	O
and	O
because	O
the	O
microcontroller	B-Architecture
often	O
cannot	O
supply	O
enough	O
current	O
to	O
pilot	O
the	O
line	O
.	O
</s>
<s>
Many	O
microcontrollers	B-Architecture
need	O
a	O
dedicated	O
RESET	O
line	O
to	O
enter	O
in	O
the	O
Programming	O
Mode	O
.	O
</s>
<s>
It	O
is	O
necessary	O
to	O
pay	O
attention	O
to	O
current	O
supplied	O
for	O
line	O
driving	O
and	O
to	O
check	O
for	O
presence	O
of	O
watchdogs	B-Application
connected	O
to	O
the	O
RESET	O
line	O
that	O
can	O
generate	O
an	O
unwanted	O
reset	O
and	O
,	O
so	O
,	O
to	O
lead	O
a	O
programming	O
failure	O
.	O
</s>
<s>
Moreover	O
,	O
some	O
microcontrollers	B-Architecture
need	O
a	O
higher	O
voltage	O
to	O
enter	O
in	O
Programming	O
Mode	O
and	O
,	O
hence	O
,	O
it	O
’s	O
necessary	O
to	O
check	O
that	O
this	O
value	O
it	O
’s	O
not	O
attenuated	O
and	O
that	O
this	O
voltage	O
is	O
not	O
forwarded	O
to	O
others	O
components	O
on	O
the	O
board	O
.	O
</s>
<s>
In-System	B-Device
Programming	I-Device
process	O
takes	O
place	O
during	O
the	O
final	O
stage	O
of	O
production	O
of	O
the	O
product	O
and	O
it	O
can	O
be	O
performed	O
in	O
two	O
different	O
ways	O
based	O
on	O
the	O
production	O
volumes	O
.	O
</s>
<s>
Test	O
points	O
are	O
used	O
to	O
perform	O
functional	O
tests	O
for	O
components	O
mounted	O
on	O
board	O
and	O
,	O
since	O
they	O
are	O
connected	O
directly	O
to	O
some	O
microcontroller	B-Architecture
pins	O
,	O
they	O
are	O
very	O
effective	O
for	O
ISP	O
.	O
</s>
<s>
This	O
one	O
has	O
to	O
program	O
the	O
device	O
or	O
devices	O
mounted	O
on	O
the	O
board	O
:	O
for	O
example	O
,	O
a	O
microcontroller	B-Architecture
and/or	O
a	O
serial	O
memory	O
.	O
</s>
<s>
For	O
most	O
Microchip	O
microcontrollers	B-Architecture
,	O
ICSP	O
programming	O
is	O
performed	O
using	O
two	O
pins	O
,	O
clock	O
(	O
PGC	O
)	O
and	O
data	O
(	O
PGD	O
)	O
,	O
while	O
a	O
high	O
voltage	O
(	O
12V	O
)	O
is	O
present	O
on	O
the	O
Vpp/MCLR	O
pin	O
.	O
</s>
<s>
However	O
,	O
for	O
newer	O
microcontrollers	B-Architecture
,	O
specifically	O
PIC18F6XJXX/8XJXX	O
microcontrollers	B-Architecture
families	O
from	O
Microchip	O
Technology	O
,	O
entering	O
into	O
ICSP	O
modes	O
is	O
a	O
bit	O
different	O
.	O
</s>
<s>
Due	O
to	O
variations	O
in	O
the	O
interconnect	O
scheme	O
and	O
the	O
target	O
circuit	O
surrounding	O
a	O
micro-controller	B-Architecture
,	O
there	O
is	O
no	O
programmer	O
that	O
works	O
with	O
all	O
possible	O
target	O
circuits	O
or	O
interconnects	O
.	O
</s>
<s>
By	O
holding	O
PGM	O
high	O
,	O
the	O
micro-controller	B-Architecture
will	O
enter	O
LVP	O
mode	O
.	O
</s>
<s>
PIC	O
micro-controllers	B-Architecture
are	O
shipped	O
with	O
LVP	O
enabled	O
-	O
so	O
if	O
you	O
use	O
a	O
brand	O
new	O
chip	O
you	O
can	O
use	O
it	O
in	O
LVP	O
mode	O
.	O
</s>
<s>
If	O
you	O
program	O
the	O
micro	B-Architecture
controller	I-Architecture
with	O
no	O
connection	O
to	O
this	O
pin	O
,	O
the	O
mode	O
is	O
left	O
unchanged	O
.	O
</s>
