float salida;
unsigned int salida_entero;
unsigned int duty_pwm2;
salida_entero = (unsigned int) salida; // Cambiando de tipo de dato float a 8 bits sin signo.
if (salida_entero>0) duty_pwm2++; // Incrementamos el duty cicle
else if (salida_entero>=1024) duty_pwm2=1024; // Valor máximo del duty cicle
else if (salida_entero<=0) duty_pwm2=0; // Valor mínimo del duty cicle