I can not understand what you want to do alichan.
MCLR pin from microchip MCUs (pic12,pic16,pic18) if is used like an "I/O" pin is only an Input pin. So, if you have something on this pin what you want to protect, you can use a diode, but I think that a sensible output from other device is already protected internal.
Sometimes is a problem with VPP line and MCLR when is used reset circuit from datasheet(with capacitor), but there is a big note: External Power-on Reset circuit is required only if the VDD power-up slope is too slow. The diode D helps discharge the capacitor quickly when VDD powers down.
if you have this problem you can remove the capacitor from this circuit.
Well the problem is not realted to MCLR, just triggering a signal when VPP reach some level... the image is just an example, it shouldn't be taken as a real one. Until now i haven't found a suitable way to trigger the signals without having serious problems with the ICD3 (including overheating :S).
I can say i haven't found any information about this issue, neither Microchip forums... i have seem some "automatic" switchers but many of them don't work (i tested them) or have serious limitations. In fact none solve the problem of MCLR. Only 1 automatic switcher "does", but the design is closed and based in another PIC but from the information i read i could guess it only receives the programming/debug information from the ICD and is this PIC which really programs the device not the ICD, but also in this case, they are severe limitations: for example you only cannot use the external power supply when programming with the ICD3 (that limits you to a max of 100mA in the whole circuit).
I could successfully switch almost all the signals (PGM, PGC, PGD), less VPP. It fails if you attach any active circuit. Basically the the switch is an analog switcher/demux (with specific impedance when the channels are on -i think i was using a 74HTC4053-) and some logic and voltage level adapters to determinate when the switcher must be turn on/off.
Similar analog switchers also works but you have to take care with voltage levels, impedance on channels, switching frecuency, etc. For my tests that chip was fine.
You can see some designs that claims they deal with VPP, normally using a 4066, but they don't work (not at least with the ICD3,maybe they do with ICD2 because there are some differences). And if they do, all violate the voltage maximum ratings and other parameters.
For now i have this issue stopped... i'm not in the mood to burn my ICD3, and trust me when i say the outputs aren't very well protected... you can burn it easily, too easily, the risk is real and high. This is an issue that Microchip should have solved long time ago, but they didn't. Of course the ICDs aren't designed to play with the output signals, but well... shortcircuits happen and usually the ICD burns (at least the ICD2) xDD
If you can live with the VPP signal connected to MCLR as usual, they my weekend-design works and surely will work for LVP (i haven't tested it)
This is the typical upper leg bridge driving problem . You have a voltage on base of the transistor which is in range of output voltage or lower . When the transistor conducts your voltage on base is not high enough to hold it opened and it begins to oscillate . The solution would be to connect 2 transistors first npn with emmiter to gnd base to your VPP - ICD and the collector to second transistor of a pnp type via resistor to the base. The emmiter of second transistor goes to +13V and collector to output ( and via a other resistance to gnd ).
Posted on: October 28, 2012, 11:14:47 11:14 - Automerged
shematic of the solution included in png picture
Thanks, I know that. I used that simple design to show the idea, but i think it only created more confusion xD. Next time i should use the typical diagram with boxes instead real components. It's my fault not explaining it correctly.
But other people will read the forum and learn from this