I have designed soft starters using the PIC16C74A/F77 processors. Zero crossing can be tricky if you also have to work in noisy environments.
If you don't need the processor to be isolated from the line, there's nothing wrong with a couple high-value resistors feeding a CPU pin. I would use a couple shottky diodes to augment the internal protection diodes just as a matter of robustness, but it'll work fine. If you need isolation, use a transistor output optoisolator. Pay attention to the switching speed of the opto and minimize the transistor collector current to maximize switching speed.
Having said that, let's move on to noise. If you're phase-controlling anything other than resistive heating you'll have noise to contend with which means it's very likely you will have zero-crossing noise to deal with. Don't do the rookie mistake of feeding the zero crossing input to an interrupt pin; that will turn your software into a smoking mass of nastiness when the processor tries to deal with a gazillion interrupts. (I speak from experience.) Throwing an RC or more advanced low-pass filter on the line will just introduce phase shift. If you can work with that, great. If not (I had to deal with 50/60 and 400Hz systems) then you have to try other means.
On my own design I took care of it in software by polling the line and essentially making a voting routine that ignored transients. The phase shift was within what I could handle, it was fast and it wouldn't crap out even in heavy noise. (Tested in a facility where they removed the filter caps from an induction furnace, I've never seen such a noisy line before!) If I were to redesign it I think I might try an external solution involving a one-shot that would "latch" the zero cross and then the microcontroller would acknowledge it before the next interrupt could be set.
All said, I think that reliably finding the real zero crossing in any practical situation was one of the trickier bits of the soft starter design. Closing the control loop was secondary, but it was mostly just tuning. It seems like a dead-simple thing to do but I learned quite a bit about the difference between theory and practice during that time. :-)
edit to describe "voting" routine:
If I remember correctly, I had an I/O line that was high when the line was above zero and low when the line was below zero. The voting routine simply polled that line and if 2 of the last 3 samples were the same, I accepted the fact that the line had crossed zero. It's very similar to a UART's voting circuit to detect mark and space. The benefit of a circuit like this is that your phase shift is fixed (2*sample rate) and you can tune it for the type of noise you're experiencing. I do not remember offhand how fast the polling was but if I were to hazard a guess I would say 8kHz, as that number sticks out in my mind.
I have tested this that and found that there are something unstable over it. It develops a form of "noise" which disturb the signal. This takes place between every 30 seconds to 1 minute. (Perhaps my setup?)
This is a simple one
Opdate:
About the message "Simulation is not running in real time" here, try the following.
Select 'Set Animation Option' from the menu system and simply push the 'SPICE Options button'. Try to put [ABSTOL] down to, for example 1e-08 and see if it helped.
If it has not helped, try to go further down or if it helped, try to go one up by one until the error recurs, then go one down.
Best Answer
Why not use an optocoupler? Vishay's SFH6206 has two LEDs in anti-parallel, so it works over the full cycle of the mains voltage. If the input voltage is high enough the output transistor is switched on, and the collector is at a low level. Around the zero crossing, however, the input voltage is too low to activate the output transistor and its collector will be pulled high. So you get a positive pulse at every zero crossing.
The most important parameter for an optocoupler must be its CTR or Current Transfer Ratio, which gives you the ratio between output current and input current. You can compare it with the \$H_{FE}\$ of a common BJT. But while \$H_{FE}\$ for a small signal transistor is often higher than 100, CTR is low. So low that it's expressed in %, like 20%. That's not 20, that's 0.2.
A CTR of 0.2 means that you have to drive the input LED(s) with 1mA to get a mere 200\$\mu\$A out. Usually that's not a problem, since the output is often only used to get a logic level, which will connect to a high impedance input. In that case a high value pull-up resistor can be used, like > 27k\$\Omega\$ in a 5V system. Then the 200\$\mu\$A is sufficient to drive the output low.
Detailed calculations can be found here.