Temperature sensor. A 10 kΩ precision thermistor temperature sensor in a resistive divider circuit provides a voltage input (Vth) to the PIC12 comparator (GP1, CIN-) that is proportional to device temperature. The magnitude of Vth is a fraction of the battery voltage Vdd and varies linearly with thermistor temperature. The comparator compares this voltage to an internally generated reference voltage (Vref). Comparator output is high (1) when Vth > Vref and low (0) when Vth < Vref. The value of Vref is set programmatically with a 4-bit parameter, allowing a range of reference temperatures to be used for implementing various device functions such as starting or stopping data logging to internal memory.