Esto:
if(0<=Voltaje<=9.0)
{
output_high(PIN_A0);
output_Low(PIN_A1);
output_Low(PIN_A2);
}
if(9.0<Voltaje<=11.0)
{
output_high(PIN_A1);
output_Low(PIN_A0);
output_Low(PIN_A2);
}
if(Voltaje>11.0)
{
output_high(PIN_A2);
output_Low(PIN_A0);
output_Low(PIN_A1);
}
Por esto:
if( Voltaje <= 9.0 )
{
output_high(PIN_A0);
output_Low(PIN_A1);
output_Low(PIN_A2);
}
else if( Voltaje <= 11.0)
{
output_high(PIN_A1);
output_Low(PIN_A0);
output_Low(PIN_A2);
}
else
{
output_high(PIN_A2);
output_Low(PIN_A0);
output_Low(PIN_A1);
}
Tu problema que para hacer esto:
en realidad deberias hacer esto:
if( (0<=Voltaje) && (Voltaje<=9.0) )
No hay necesidad de comprobar si es menor a 0. Por que el valor de salida del ADC es de 0 a 255 en 8 bits.
Tampoco hay necesidad de preguntar si es menor a 11 y mayor a 9, si es que antes ya deduciste que NO es menor a 9, por eso lo cambie por else if.
Y el ultimo no hay necesidad de preguntar por el valor, a no ser que quieras agregar un nivel mas, por si se pasa de voltaje.