On Mar 24, 4:19 pm, Joep Suijs <[email protected]> wrote:
> If this pinout is what Microchip advises and is commonly used, you > might have guessed the is no such problem as you describe above. > Programmers are either capable of handling this (like a pickit2, that > switches power on and of on this pin) or even rely on power on this > pin (like wisp628). > > So please comply. > > Joep The pinout is correct. but the design of the target's PSU circuit must take account of ICSP feature. That's what I'm talking about. There is somewhere a Microchip document that outlines the precautions. see this ww1.microchip.com/downloads/en/DeviceDoc/31028a.pdf also page 4. Which isn't showing the 2nd reverse diode from reset capacitor to VDD to ensure the capacitor discharges and provides reset after short power glitch. That schematic doesn't number the pins, but is in the correct order. If the target has only higher impedance devices or peripheral inputs (PIC is output) on RB7 and RB6, then "Isolation Circuits" are not needed. If the RB6 or RB7 is inputs from a peripheral in constant output mode (not tristate during programming) then there should be jumpers or a pair of switches driven from Vpp / MClR HVprog pin 1. (13V) See also http://www.microengineeringlabs.com/support/icsp.htm and indication of protection diode, also shown in circuit above. Even with series resistor, and especially with the enhanced diode across resistor "reset", you need the series diode to MLCR/VPP pin from R/C or main VDD to protect your target PSU and reduce draw on the programming Vpp at 13V nominal. see also http://www.embedinc.com/picprg/icsp.htm Quotes "Beware that some linear regulators, like common 7805 for example, can be damaged by raising their outputs above their inputs. A diode from the regulator output to its input my be required. " Professional ICSP Programmer will control VDD. The main PSU must be somehow isolated or off and only the PIC vdd connected to ICSP. I accomplish this with two Schottky diodes. Quote "When the programmer will drive Vdd during programming, the target circuit must be off, or at least the power supply to the PIC must be off. Furthermore the circuit must tolerate the PIC Vdd pin driven up to the PIC's maximum Vdd spec. This is usually 5.5V, and may be several volts higher than the circuit normally operates at or is designed to run at." Not all ICSP programmers actually connect to PGM pin Quote "PGM should be low during programming The PIC PGM pin is used to enable low voltage programming on some PICs. Even though this is not one of the programming lines and is not connected to the programmer, it should be held low during programming. According to the documentation the PGM input should not matter during high voltage programming, but we have seen cases where it does anyway. A 100K ohm resistor to ground is a simple fix in most cases. " Especially on virgin 16F887. Only use a short cable from programmer to target. Mine is about 4cm. The pod then uses a straight and short RS232 level modem cable from PC serial port. Poor thin or long Serial cables have too much PGD/PDC crosstalk. Quote "The standard Microchip cable unfortunately puts PGD and PGC on adjacent lines. Since this is a flat cable, this can and does lead to crosstalk between the two in some cases. For writing to the target, the programmer drives both lines. In that case a little low pass filtering can be applied by the programmer to soften the edges and reduce the coupled amplitude on one line from an edge on the other. However, there is a case that must be addressed by the target circuit. The PGD line is bidirectional, meaning it is sometimes driven by the target PIC. In that case PGD is just a normal digital output on the PIC. These are designed to drive from one state to the other as quickly as possible. Such an edge produced on PGD by the target PIC can couple onto the PGC line when using the standard cable supplied with an ICD2, or any other cable where PGC and PGD are adjacent. The target PIC then sees a PGC (clock) pulse that the programmer didn't produce and the serial communication gets out of sync. The net result is that programming appears to be flaky or not work at all. This entire effect can happen within the time for the PGD edge to propagate from the target PIC, thru the cable to the programmer, and back thru the cable to the target circuit. This means that this problem can not be solved at the programmer end of the cable. No amount of clever circuitry at the programmer can make this issue go away. It must be dealt with at the target circuit. " -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
