> the safest way is to use an opto-coupler. > > I have vast experience in this field (dimmers in professional lighting field) > and if you only knew what comes down those AC lines...... you'd use an opto > too. > Nicest way of doing it is to put the INT pin via a zener and res after > step-down trafo, separated by a diode from the main storage caps. > > Microchip say you can do it with just a resistor, and that it will be ok ( > reasoning is: high impedance resistance.. a few megs, capacitance of pin for > slew limit, maximum current through pin is ok and clamps to PSU rail, due to > certain circumstances use 2 diodes to strap the pin to v+ and 0V ). I tend to > agree with them. The diodes internally vary from port type to port type so > BEWARE. Microchip's mother wears army boots and dresses it funny too, in this instance. Although, a laaaaarge enough value resistor approaches reasonableness. Just because one of the manufacturer's people says it's OK doesn't mean it is. The same applies if its written in an app note. In the operating conditions section of a spec sheet SHOULD be different. (In the absolute maximum section doesn't count). When they put it in a data-sheet as a guaranteed spec you can *try* and hold them to it - even then it still won't work if it breaks the laws of physics. *IF* they actually suggest, as you say they do, that using external diodes may be necessary, it proves they have found out by experience that the internal catch diodes DON'T always work well and take you too near the ragged edge and are taking you SOMEWHAT further away from the edge. Consider, the internal diodes are standard silicon devices with a nominal 0.6v forward conduction voltage. Adding another silicon diode in p[arallel externally MAY reduce internal currents significantly, and may not. Adding external SCHOTTKY diodes is another story - that will work as the Scottky's will conduct before the internal silicon diodes. If that is what they are recommending then I apologise about the army boots comment. Shame about the clothes though. > This is also documented in the Microchip AppNotes. Yeah. > The safest way of doing it is via an opto-coupler, which needs a reverse > diode accross the internal LED, and suitable current limit resistor so as not > to get too much delay on the sync relative to the 0 point on the wave. Yes. Or someother "proper" isolation system. Note that even optos have their limitations in very high rise time situations, but that's not liable to be much of a problem here.(very bad input transients may need to be considered). It IS possible to design a resistive input mains interface that doesn't violate IC input specs and which handles reasonably probable transients well. It may be cheaper than using an opto but will not be safe for human isolation purposes. Russell McMahon -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu