资 源 简 介
tltgen generates thermistor lookup tables for thermistors. Such lookup tables can be used for fast ADC to temperature conversions, for instance on an embedded CPU.
The lookup tables generated by tltgen are based on either the beta equation (1/T = 1/T0 + 1/B*ln(R/R0)) or the Steinhart-Hart equation (1/T = A + B*ln(R) + C*(ln(R)^3)). The latter provides more accurate results over a larger temperature range, but some thermistor datasheets do not mention the required A, B and C parameters.
tltgen has the ability to calculate the Steinhart-Hart parameters, when given at least 3 measured data points. These datapoints are either (temperature:adc-value) pairs or (temperature:resistance) pairs. If more than 3 data points are given, tltgen will use the least squares method to calculate the Steinhart-Hart parameters that fit most closely to the given data points.
tltgen outputs a C source file and an accompanying header file. The C file contain