Hey Glen, I've just picked up on this thread so forgive me if I've missed something. What you are doing here is dangerous! I gather someone recommended optoisolators for the safety factor but if you think they're too expensive use a small power transformer with a low secondary winding (say 6.3vac) and a bridge rectifier (no filter capacitor) and resistive divider or zener to get your zero crossing points - if the application is mains powered you could even use your existing supply/plugpack if you insert an isolating diode in there to isolate the filter cap. Or you could make your own transformer using some turns around a current carrying wire - the result in either case being good isolation from the mains. Try and stay away from the single big resistor method as only special types are rated at high voltages (you may fry yourself as well as your micro...). In any application your safety and future persons' safety (who may access the unit) is paramount - with mains there is usually no second chance. Do it right the first time - safety first, price next. >ac---------|>-----| res > 240v |------/\/\/\-----|rb3 (values for 240v) >ac---------|>-----| 10m > Please don't take this as a flame. Regards, Bill W J Sherwood Senior Electronics Technician WNI Science & Engineering 31 Bishop St, Jolimont Perth, West Australia 6014 tel +61 8 9387 7955 fax +61 8 9387 6686