The goal is to scale the ADC values of 0-255 to a range of duty cycles appropriate for my project (100-252 with the chosen prescaler). If I manually calculate the results are correct:
  • ADCInVal =0 yields 100
  • ADCInVal=127 yields 175
  • ADCinVal=255 yields 252

But perhaps I don't have the order right in the expression because I don't see those results with the above code.