In the figure we have the way to use a comparator of the LM339 series in the excitation of CMOS inputs. The circuit is used in several configurations shown on this website.