I measuring a 02 sensor which outputs 30% duty cycle at 0% oxygen and outputs 80% duty cycle at 21% oxygen. I then measure the duty cycle and convert it to 0-5 volts.

We read the % oxygen in tenths ie. 8.5% oxygen.

I can order a pic with hardware PWM I'll just have to look and see what best fits my needs. I have 4 channels to monitor.

Is there a better way to accomplish what I'm doing?

Thanks