pwm registers working. not generalized as much as i would have liked