I'm experimenting with PIC programming controlled by an Arduino Uno, and I'm using the PIC12F675. I actually got the PIC to enter programming/verify mode yesterday and was able to read out the device ID, but before that happened I actually burned off a PIC, but I'm not sure exactly what I did wrong.
The problem was related to the MCLR/VPP. In order to enter program/verify mode, this has to be driven to a high voltage (at least 3.5V higher than the power source) as part of a sequence of initialization events. So I connected the Arduino to a 12V power supply and used 5V to feed the Vdd on the PIC and the 12V to the MCLR (max is rated at 13.5V). At that point I thought that since the MCLR was the first signal to be driven high, I could simply tie it permanently to a high voltage source (12V). But after turning the board on, the PIC quickly became very hot and (as it turned out later) was burned out. The reason why I connected it directly without a resistor was that the programming specification (http://ww1.microchip.com/downloads/en/DeviceDoc/41191D.pdf ) said:
In the PIC12F629/675/PIC16F630/676, the programming high voltage is internally generated. To activate the Programming mode, high voltage needs to be applied to the MCLR input. Since the MCLR is used for a level source, the MCLR does not draw any significant current.
In other words, the high voltage input is not used as an actual power supply, it is just a way of signaling you want to enter programming mode. So I read the above (especially the "the MCLR does not draw any significant current") in the way that the PIC's MCLR PIN would have a high internal impedance and would thus not draw any significant current, hence it should not be necessary to provide any resistors etc. Also there's no note in the datasheet saying how much current you are allowed to transfer through any of the PIN's. But clearly that's not how it actually worked. Also earlier in the experimentation I was working with smaller voltages (8.5V) where I also connected direclty, and this didn't cause it to heat up so it can't just be a plain short circuit since then 8.5V should burn it out too.
Another question along the same lines: When connecting the analog PIN's of the arduino to the GP0/GP1 PIN's on the PIC, is it necessary to use resistors? Again, when the GP0/GP1 on the PIC are in input mode they should have high impedance, so I don't see why I could simply connect it directly to the Arduino. Now in this particular case, the data PIN (GP0) actually changes between input/output at specific points during programming and the Arduino has to do the same, so I guess one needs to be careful about changing at the same time so they are not both in the output state simultaneously (since that doesn't have high impedance). But to be sure I added some small resistors (470R) to limit how bad things can go. But it would be nice to know if this is really necessary, since again the datasheet doesn't say how much current you can transfer through the PIN's.
(in the new circuit I made that actually works I have 15K ohm between the 12V and the MCLR and I also control the MCLR through a transistor so I can turn it on at the right point in the sequence)