PWM controlled by NIOS processor