Raja,
You're not being very clear on why you need the mains to connect to the PIC. Is it to just detect presence of mains, or is it for timing the zero crossing?
In the first case, you simply convert the mains to a low voltage DC and read it digitally or via the ADC.
In the second case, a simple half wave rectifier followed by a voltage divider will let you catch the zero crossings.
Good luck
Bookmarks