Setup PWM and Average code in parallel.