> http://www.picbasic.org/forum/archiv...hp/t-2134.html to be that url would seem broken, i'd think the easiest way to do this would be to put your cuircuit ground at mains neutral, then use some resistor/diode cuicuitry to bring the mains voltage on each phase down to something reasonable and cut out the negative components of it, then use the schmitt trigger inputs on the pic combined with some edge order detection code. note: if you do it this way however you should treat the whole cuircuit as live since mains neutral may become live under fault contitions. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist