i am using atmega 16 and moc 3020 i need a code for zero crossing detector..........and code also do triggering of wave form at different......somebody knows about it??????????
A zero crossing detector is normally a hardware solution, there is no code for it.
When your hardware has found the zero crossing point, you can alter the trigger point by using a software delay between zero and the period of the waveform.