On Mon, Oct 08, 2001 at 11:19:43AM +0200, Wojciech Zabolotny wrote: > > Probably, when the relay gets switched off the spike of high voltage is > generated on the NPNs collector, which then breaks down the CB junction and > further propagates to the PIC's output (BTW what is the resistor between PIC > output and the NPNs base?). > Add the diode parallelly to the relay's coil (anode to the NPNs collector, > cathode to the Vcc), it should fix the problem. Ooops... sorry I've sent the message before I thought carefully. The effect described above should not lead to PIC destruction, because the high voltage spike will be shorted to the GND by BE junction :-(. But anyway you need the protection diodes to avoid NPN destruction. -- Wojciech M. Zabolotny http://www.ise.pw.edu.pl/~wzab <--> wzab@ise.pw.edu.pl http://www.debian.org Use Linux - an OS without "trojan horses" inside -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu