I had a lot of problems using a pic 12c508 to sense the zero crossing of the mains. If you use a high value resistor (10M) from a pin to rectified mains this pin is fed from a high impedamce, and is very sensitive to electrical interference as well as strange things happening when current flow into that pin. I personally do not allow any current to flow in or out of an input. I also got caught by putting a zener (4V7) on the input, it allows current as the circuit fires up. I now put a transistor inverter before any input if there is a possibility of that input signal going outside of the supply range. (see, you where right about starting a Jihad!) ----- Original Message ----- From: Andy Jancura To: Sent: Sunday, August 05, 2001 11:06 PM Subject: Re: [PIC]: 100 really obscure factoids about PICs > Hi, > > I forgot the subject, again > > > > Hello Bob, > > >A typical circuit uses two resistors in series and adds silicon diodes > >to clamp the junction of the resistors to Gnd and Vdd, thus limiting that > >junction to the range Vss-0.6 to Vdd+0.6 or so. This is _still_ out of > >specification for the PIC pin! > > in this case you have cascaded R-2D, R-2D (the second 2D inside the chip), > so the second R has limit only 0.3V from 0.6V at the first stage. If this > isn't o.k. you can still choose schottky. But the questions should be : > which voltage are you protecting the pins from? Depending on the answer, you > should go different ways. > > Andrej > > > _________________________________________________________________ > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > -- 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