In the figure we have the way to obtain hysteresis of an operational amplifier LM111. The circuit is from Motorola's 1990 Linear Databook, but it can be implemented with more modern operational amplifiers and with other supply voltages.

In the figure we have the way to obtain hysteresis of an operational amplifier LM111. The circuit is from Motorola's 1990 Linear Databook, but it can be implemented with more modern operational amplifiers and with other supply voltages.