Fixed square wave duty cycle, cleaned the ISR for resetting 'count'