A new technique to measure a capacitor or a capacitive sensor by means of a direct sensor-to-microcontroller interface circuit that does not need a calibration capacitor is proposed. Basically, the measurement process consists of three consecutive steps of charge, discharge and charge of the capacitor under test. A non-linear equation is obtained and solved that is dependent only on known circuit parameters. Experimental results show that it is possible to measure a wide range of capacitor values with a maximum deviation of 2% from the reference value, and that temperature changes from 18 to 70 degrees C yield relative errors below 0.1%. For the lowest measured capacitor range (33 pF-4.7 nF) the uncertainty holds below 1 pF which enables measurement of commercially available capacitive sensors. The main advantage of the proposed technique is cost and space reduction of the final design.