got the zero crossing solution its good...
u can have the details from http://www.hoelscher-hi.de/hendrik/english/dimmer.htm#zc detection
u can have the details from http://www.hoelscher-hi.de/hendrik/english/dimmer.htm#zc detection