Hello, I'm thinking about this: input-------100K-----PICinputpin I know the PIC (I'm now using PIC18F452) input pins (except RA4) have two diodes for input voltage clamp protection. But I can't find on the datasheet more detailed informations about those diodes. The PIC18FXX2 datasheet says: Voltage on any pin with respect to VSS (except VDD, MCLR, and RA4) ....................................... -0.3 V to (VDD + 0.3 V) PICREF-4 (PICDIM Lamp Dimmer for the PIC12C508) says : "R9 is connected to the "hot" lead of the AC power line and to pin GP4. The ESD protection diodes of the input structure of the GPIO allows this connection without damage (see Figure 1). When the voltage on the AC power line is positive, the protection diode from the input to VDD is forward biased, and the input buffer will see approximately VDD+0.7 volts and the software will read the pin as high. When the voltage on the line is negative, the protection diode from VSSto the input pin is forward biased, and the input buffer sees approximately VSS-0.7 volts and the software will read the pin as low. By polling GP4 for a change in state, the software can detect a zero crossing." So I would assume the diodes have a 0.7V voltage drop, but is this enough to protect the PIC input pins if the maximum pin voltage is "-0.3 V to (VDD + 0.3 V)"? Also, I can't find anywhere how much current those pins would support. I plan to connect a PIC pin to a transformer (aprox 30VAC) output with a 100K resistor to detect frequency. I have done it before using external protection diodes, but I'm thinking about doing it the simplest and cheapest way. Best regards, Brusque -- ----------------------------------------------------------------- Edson Brusque C.I.Tronics Lighting Designers Ltda Research and Development Blumenau - SC - Brazil Say NO to HTML mail www.citronics.com.br ----------------------------------------------------------------- -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics