Good day/morning/night gentlemans. I have a question which may be defined as FAQ. I have to synchronize a zero cross main signals with an output nibble on both rising and falling edge. I have done this in hardware using one 4093 and a few resistors, capacitors and one zenner for detection and a 74ls373 for command. I'm not sure if the best choice on a PIC will be to use rb0 as zero cross detection interrupt. The nibble must be outputed synchronously with the rising edge of the mains signal and shutted off after a desired time period on the falling edge of the same signal. I think also interrupt on change could satisfy this request but I want to know other opinions. The PIC will be 16F628. Thank you in advance and have a happy day. Vasile -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.