The problem about using the LM318 op-amp

Frequency and amplitude are two different things... And if you force it to a square wave you'll loose the amplitude information.

I'm not exactly sure what you're doing but MAYBE you want a comparator which is one of the EASIEST things to make with an op-amp. It gives you a digital high/low output so it also looses amplitude information.

Typically, you use a voltage divider (2 resistors) to get the threshold/reference voltage. And you can add feedback for hysteresis to make it "act like" a Schmitt trigger.

Note that op-amps usually need (or "like") positive & negative power supplies and that's often not shown on "example circuits". And, you have to "be careful" because most digital circuits don't like negative voltages (or voltages higher than Vcc).