Schau dir mal den IC und den IC an.
Hier ist auch nochmal die Funktionsweise erklärt. Und auch ein Schaltplan.

jon