David Venz wrote: >Dan, > >The question would be - what is a "safe" current in each variety of PIC's >internal input circuit? Where did you get your figure of 25mA from? > David, I just checked the datasheet for the 16C7x, and it actually says +/-20 mA. Max input clamp current, under Electrical Characteristics. If you use a 330 ohm series R in each line, like I do as a general rule, then you have ~7v overvolt protection. My personal philosophy is to NEVER hang an unprotected pin onto a header for external connections, etc. 330 ohm is a nice choice, IMO. However, during qualification testing - specifically intended to help determine what stress levels the internal diodes could handle - I have purposely applied up to 80 mA via series R, and not had the internal diodes pop. So, I assume there is a fair margin of safety on the spec. ============== ....... >Anyway, the PIC hasn't blown up yet, but I'm open to suggestions - what was the >problem with a 5v1 zener again? The inputs also have a 0.1uF cap between the >junction of the external clamping diodes (before the second R) and ground. > 5v1 should still have a series R upstream, plus I imagine some people believe the ~0.7v for below gnd swings violates the spec. Also, if the input signal is high-speed, then the zener capcitance is going to severely slow the response - prolly not a problem for your situation. =============== >Vcc (+5V) >----------------------------+-------------------------------- > | > D1 ^ > 10k | 10k > (From Car) o------[ R1 ]---+--+---[ R2 ]----> PIC input > (0-14V) | | > | = C1 > D2 ^ | 0.1uF >GND | | >----------------------------+--+----------------------------- > If you are having problems with sensing near gnd, you might try reducing R1 and R2 to the 1K region, or less. You will still have tons of safety margin with your ckt. Do the calcs, using 20mA max into the pin. For this ckt, R2 can be very small, and still meet it. - dan michaels www.oricomtech.com ========================= -- 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