> There is a SPEC for the absolute max voltage allowable to > connect to a PIC pin and your 170 vdc peaks (not to mention > spikes) are way out of spec. All you need is a 5.1v 1w Zener > from the pin to gnd. This will give reverse voltage protection > (zener forward conduct) and will limit the max voltage that > can ever appear at the PIC pin to about 5v. Always use a > zener when there is a possibility that the volts could exceed > spec. I don't want to hear about internal clamp diodes, I > feel strongly about this like Bob does about overclocking > and Olin does about comments. > > -Roman Roman, As you note re: overclocking, I am a stickler for sticking to the specs. Just out of curiosity I scanned the datasheet for a couple popular PICs: the 16F87x and 16F84A. In both of them, I found the following in the 'absolute maximum ratings' section: Voltage on any pin with respect to VSS (except VDD, MCLR. and RA4) -0.3V to (VDD + 0.3V) Input clamp current, IIK (VI < 0 or VI >VDD) +/- 20mA Now to me, these two specs seem to contradict each other. From the latter, for example I would think that a 15V signal thru a 100K resistor could safely be connected to the PIC, since the clamp current of the protection diode would only be (15V-5V)/10K = 0.01ma, which is orders of magnitude below the 20mA specified. But of course, this connection would then drive the pin to one diode drop above Vdd, which exceeds the voltage spec. What gives? Why specify a nonzero maximum clamp current when the voltage spec implies that you can never apply an input that forward biases the clamp (ie protection) diode? Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu