Error analysis of a resistive sensor-to-microcontroller interface based on pulse-width modulation and time–ratio measurement shows that internal input and output resistances in microcontroller digital ports produce zero, gain and nonlinearity errors. The time–ratio measurement technique cancels these errors when the sensor resistance equals the reference resistor and reduces errors around that point. We propose two simple methods of reducing those errors for sensors with a wide dynamic range. Both methods use time–ratio measurements. The first method uses several reference resistors covering the sensor resistance range; the second method uses two-point calibration. The second method is more efficient and yields errors that can be smaller than 0.5 Ω for a sensor resistance from about 600 Ω to 3550 Ω.