Reads a value from Port B and uses it to control the PWM value.