There are some op-amps or comparators that have input voltage ranges that go BELOW zero. Sorry, but I don't remember which ones. I'd say probably from Maxim (which may mean they are vaporware). That would be a great way to detect zero crossing. Just ground the inverting input, connect the AC to the non-inverting with a 10K-100K resistor, and use a 10M feed back resistor for a tiny bit of hysteresis. Zener or Schottky clamp may be needed to protect the input pin. You could even power the detector on the line side and use an opto to isolate it from the micro. One recent project I did has a triac driver and zero crossing detector powered by the line, opto-isolated from the micro. The detector uses an LM339 to compare the line voltage to a 200 mV reference. It works really well, though I haven't tried it on industrially noisy lines. The power supply consists of a dropping resistor, zener, rectifier (1n4004) and filter cap. The 200mV reference is simply a divider from the power supply. The line voltage is picked off the cathode of the zener and coupled to the LM339 by a 10K resistor. Don