added duty cycle modification on square wave channels