PWM Control A program using 8-bit and 16-bit counters on the Atmel SAMD20 for PWM to either generate a 500Hz sinusoidal or control a motor's speed.