Hi there,

Which PIC are you using ayway and how are you detecting the zero cross.

It is also important if you are detecting every or alternate zero crosses.

If you are using an interrupt based routine then do the following

1. Play with Timer0 and reset it every zero cross. All turn off the outputs. Its best to do it in assembly.
2. Thus your timer functions as a digital ramp generator now use to loop to detect if the timer has reached the desired value. In this way you do not have to care about the glitches.
3. A 5us time might be not enough. It is best to keep the outputs latched till the next zero cross. This will also let you use low loads under the latching current of the SCR.

Regards

Sougata