Years ago we sensed the AC line for counting timing pulses with a current limiting resistor to a port pin. I seem to remember an ap note possibly by John Day on that subject. I think it was done on a 16C54 but not sure. Larry G. Nelson Sr > > From: olin_piclist@embedinc.com (Olin Lathrop) > Date: 2005/10/26 Wed PM 01:58:37 EDT > To: "Microcontroller discussion list - Public." > Subject: Re: [EE] Inputs over Vdd / under Vss with current-limit > resistors... ? and "input clamp current" spec? > > Jesse Lackey wrote: > > Now reading the absolute max ratings, of course, you can't do either of > > these things. Any pin except A4/MCLR is Vdd+0.3V max; A4 is 8.5V max. > > So what's the question on RA4? Do you think "absolute maximum" is ambiguous > or somehow doesn't apply to you? > > > There is another spec that says input clamp current (IIK (VI < 0 or VI > > > VDD)) is +-20mA. (This is the 18F1220/1320 datasheet FWIW.) I presume > > this doesn't mean the PIC clamps the current to +-20mA... what does it > > mean, exactly? > > I take it to mean that if you put more than 20mA thru the protection diodes > they can go poof. > > > So, if I current limit to a milliamp or less, maybe even .1mA, am I ok > > here? I don't see the harm in forward-biasing the input protect diodes > > with a small current, but then again I don't know much about chip design > > norms... > > A small current is OK in some cases. Even small currents can upset A/D > readings. Also this current must not be on when the chip is powered up, or > it could go into SCR mode. 100uA applied after the chip is fully powered on > and if you're not using the A/D is probably OK. > > > I can add transistor switches etc. if need be, but if the above is > > workable it is definitely preferred. > > > > This is going to be a commercial product, so unfortunately solutions > > that "cheat" and will "normally work at least for awhile" aren't going > > to cut it... > > What's the cost of a failure? Compare that to the $.05 for the extra > transistor and resistors. Unless this is a really high volume product doing > it right sounds like the clear choice. > > > ****************************************************************** > Embed Inc, Littleton Massachusetts, (978) 742-9014. #1 PIC > consultant in 2004 program year. http://www.embedinc.com/products > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist