AC-voltage measurement

Sorry if in some of the links above already mentioned:

For recognizing the zero crossing,
clipping diodes and a resistor for keeping the current low enough (Imax of diode @ Umax) should do the job.

edit:
Well, of course it has to look like here in the first post with an additional resisor at Vin.
Also Schottky Diodes should be used...
http://www.mikrocontroller.net/topic/78414

Sorry for not finding the right picture in the first.