This application note states that zero crossing detection can be achieved in an AVR with just a couple of resistors. However, it forgoes galvanic isolation and this is not acceptable for me.
I would like to supply CMOS control signal to a triac, in the same time monitoring mains voltage for zero crossing. Is there an opto device, capable of both these tasks at the same time. Preferably a small, DIP, not exceeding $1 device?
This is an AC input optocoupler:
And this is an optotriac, used for controlling power triacs:
Having them both in a sigle package, pointing in opposite direction, would, IMO, simplify and make cheaper implementation of simple AC load control.