Adding code for square wave oscillator