Electronic – ICSP Circuit: Vpp (13V) and Vdd (5V) on Pic microcontroller MCLR pin

icsppic

When hooking up ICSP, is it safe to connect Vpp to MCLR while the +5V from ICSP is also going to the MCLR pin though a pulldown resistor and Vdd of the microcontroller?

I'd suspect this to be unsafe as you would get 5V and 13V from two different voltage sources at the MCLR pin momentarily.

How can you correctly design an ICSP circuit?

Best Answer

From Microchip's In-Circuit Serial Programming Guide:

enter image description here

So the diode provides \$V_{DD}\$ to the MCLR pin when the ICSP connector is not connected or when \$V_{PP}\$ isn't present. This must be a Schottky diode.


Resistor in Vdd line.
Added RM - Steven can edit as/if desired:

Reason not 100% certain but note it is shown as a resistpr or a direct connection.
On page 2-2 of the data sheet it says:

  • Interface to the Programmer
    The cable length between the programmer and the circuit is also an important factor for ICSP. If the cable between the programmer and the circuit is too long, signal reflections may occur. These reflections can momentarily cause up to twice the voltage at the end of the cable, that was sent from the programmer. This voltage can cause a latch-up. In this case, a termination resistor has to be used at the end of the signal line.