generating square waves with any frequency and duty cycle

generating square waves with any frequency and duty cycle