Added prescaler for square wave output