Hi, > > The best way to unexpectedly kill a PIC through I/O that I have seen, > > although I have not been stupid enough to try it myself - is to attempt to > > implement the MC ap note on triac control, where it suggests (and shows a > > drawing of) connecting the AC line directly to I/O for zero-cross > > detection - relying on the pin's internal protection diodes. > > > That was just a ridculous idea to try and implement. > > I can see no problem with this, as long as the series resistor > is large enough to limit the maximum current to the manufactures > specification. It is almost impossible to keep it under the maximum current allowed all the time !!! Remember that you have many high voltage spikes going on any regular power line. Even more if you are using a dimmer that generates lots of noise. Imagine that switching a heavy inductive load such as a halogen lamp transformer ! The internal diodes cannot protect from these spikes. You have to use external protection to make sure you do not violate the specs. That application note has always amased me because it is just pure bad enginnering. I would never use that to make a real product. Best regards, Alexandre Guimaraes -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body