
The Charge Time Measurement Unit (CTMU) found on some PIC microcontrollers is a peripheral to interface with capacitive touch sensors. It can also be used in other functions, and the app note linked above provides a few ideas:
In a nutshell, the CTMU is an on-chip constant-current
source, surrounded by digital circuitry to precisely
control its operation (Figure 1). The current source
operates over four decade ranges, from 0.55 μA to
550 μA. When combined with the on-chip A/D
Converter and comparators, the CTMU can perform a
variety of basic functions:
- Capacitance measurement (relative and absolute)
- Inductance measurement (relative)
- Resistance measurement (relative and absolute)
- High-resolution time measurement
- Temperature measurement
- Current source (constant and variable)
- Precise time delay generation
- Pulse-Width Modulation (PWM) output
Via the forum.

What about this guy? :P
http://ww1.microchip.com/downloads/en/AppNotes/01375a.pdf
47. Solving World Hunger
By mass deploying inexpensive temperature (# 28) and humidity sensors (# 10), it becomes possible to make continuous, fine resolution measurements of climatic variation over large agricultural areas. This makes it possible, at least in theory, to create a closed-loop system of more precise water and nutrient delivery. This, in turn, can push crop yields to their maximum. Do this in enough places, and there will be enough food to feed everyone, everywhere. (Note that it was never said that this would be easy.)
48. Bring About World Peace
Admittedly, World Peace is still being worked on. It’s possible that it is beyond the scope of the CTMU, or it could be that it hasn’t been given enough time. Perhaps this issue is one that can be left to the readers