> Alan Gorham wrote: > > Hi > I'm encountering strange behaviour when programming a 16F874 in > circuit. > I have used a Schottky diode to isolate the programming voltage from > the supply voltage while > programming as recommended in the Microchip technical brief on ICSP. > If I try to modify some code, then the PIC will boot when I try to > program it. > > Has anybody else noticed this behaviour? > > Is it down to the selection of the diode? > > I've checked the voltages on the MCLR/Vpp pin when in normal operation > and while programming and > I see 5V in normal operation and 13V when programming. > > The attached sketch shows what has been done. > > Any hints? It sounds like the chip is not recognising programming mode. Make sure VPP is pulled to GND during powerup to keep the chip in reset. Raise it to VPP when ready to program while keeping RB6, RB7 low. Is the chip in LVP mode? If so, keep RB3 tied to GND as well. -- Best regards Tony mICros http://www.bubblesoftonline.com mailto:sales@bubblesoftonline.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu