adding pwm correction curves and a new register to hold analog voltage reference